• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

VB Error Code 400|VBA & Macros|Excel Forum|My Online Training Hub

You are here: Home / VB Error Code 400|VBA & Macros|Excel Forum|My Online Training Hub

vba course banner

Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search|Last Search Results
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumVBA & MacrosVB Error Code 400
sp_PrintTopic sp_TopicIcon
VB Error Code 400
Avatar
mymalone
Member
Members
Level 0
Forum Posts: 104
Member Since:
August 25, 2017
sp_UserOfflineSmall Offline
1
January 17, 2019 - 1:14 pm
sp_Permalink sp_Print

I just purchased a new computer and added Office Professional Plus 2016. When I tried opening my Microsoft Excel macro file, I received the error code 400 and it shutdown.  The file was originally created with the 2007 version and later saved in the 2013 version.  Do you know what caused the problem and how to fix the issue?  I contacted Microsoft and one particular team could not fix it.  

Any assistance is greatly appreciated.

Avatar
Velouria
London or thereabouts
Moderator
Members


Trusted Members

Moderators
Level 4
Forum Posts: 648
Member Since:
November 1, 2018
sp_UserOfflineSmall Offline
2
January 17, 2019 - 8:31 pm
sp_Permalink sp_Print

Can you post the file?

Avatar
mymalone
Member
Members
Level 0
Forum Posts: 104
Member Since:
August 25, 2017
sp_UserOfflineSmall Offline
3
January 18, 2019 - 3:00 am
sp_Permalink sp_Print

it is a huge file 100,000mg with many macros

Avatar
Anders Sehlstedt
Eskilstuna, Sweden

VIP
Members


Trusted Members
Level 3
Forum Posts: 873
Member Since:
December 7, 2016
sp_UserOfflineSmall Offline
4
January 18, 2019 - 4:09 pm
sp_Permalink sp_Print

Hello,

Seems likely to be some macro code that causes this. Did a search and found this topic in a different forum. Perhaps it can help you forward in finding the culprit.

https://forums.techguy.org/thr.....ro.775340/

Avatar
Velouria
London or thereabouts
Moderator
Members


Trusted Members

Moderators
Level 4
Forum Posts: 648
Member Since:
November 1, 2018
sp_UserOfflineSmall Offline
5
January 18, 2019 - 6:30 pm
sp_Permalink sp_Print

Do you have code that runs automatically when the workbook opens? If so, please post it, otherwise it's all going to be random guesswork.

Avatar
mymalone
Member
Members
Level 0
Forum Posts: 104
Member Since:
August 25, 2017
sp_UserOfflineSmall Offline
6
January 19, 2019 - 1:26 am
sp_Permalink sp_Print

Velouria,

No I have to activate each macro.  A similar issue occurred with a different file and our field support tech fixed the problem, but he is no longer with us.  I don't know what the tech did and notes were not saved in the work order.  I will take a look at the website that Anders provided and see if it helps.

Thanks

Avatar
mymalone
Member
Members
Level 0
Forum Posts: 104
Member Since:
August 25, 2017
sp_UserOfflineSmall Offline
7
January 20, 2019 - 6:50 am
sp_Permalink sp_Print

As the macro was running, it highlighted in yellow "tmp_Frequency = FrequencyArrray(j)

 

This is the code.  Do you see a problem with the code?

'sort the arrays with by bubble sort, sorting Actuals

i = 0

j = 0

For i = 0 To colCount - 1

 For j = 0 To (colCount - 1 - i)

  If (ActualArray (j + 1) > ActualArray(j)) Then

tmp_Actual = ActualArray(j)

tmp_Frequency = Frenquencyarray(j)

tmp_FrequencyFormula = FrequencyFormulaArray(j)

ActualArray(j) = ActualArray (j + 1)

FrequencyArray(j) = FrequencyArray(j+1)

FrequencyFormulaArray(j) = FrequencyFormulaArray(j+1)

ActualArray (j+1)= tmp_Actual

FrequencyArray(j+1) = tmp_Frequency

FrequencyFormulaArray(j+1) = tmp_FrequencyFormula

End If

Next j

Next i

Avatar
SunnyKow
Puchong, Malaysia

VIP
Members


Trusted Members
Level 8
Forum Posts: 1432
Member Since:
June 25, 2016
sp_UserOfflineSmall Offline
8
January 20, 2019 - 2:02 pm
sp_Permalink sp_Print

Hi Melanie

I saw a spelling error 

tmp_Frequency = Frenquencyarray(j) 

Should be Frequencyarray

No idea if it is the cause. 

Sunny

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Riny van Eekelen, Albert Hislop, Kumud Patel, Bright Asamoah
Guest(s) 7
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 873
Purfleet: 414
Frans Visser: 346
David_Ng: 306
lea cohen: 222
Jessica Stewart: 218
A.Maurizio: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
Gilbert Lemek
Ashleigh Farquharson
Jayz Luu
Fred Smith
Charles DeGraffenreaid
Cathi Giard
Sarah Young
Henry Delgado
Alita Nieuwoudt
KL KOH
Forum Stats:
Groups: 3
Forums: 24
Topics: 6360
Posts: 27812

 

Member Stats:
Guest Posters: 49
Members: 32340
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.