VBA refuses to launch - excel

I have several Excel 2007 VBA solutions which have been running fine for years. In mid-December 2018 I got a new computer and installed Office 2007 and all was fine until about three days ago, when as soon as I tried to run a solution or enter the VBA or macro section under the developer tab, I get a message "Unable to load VBE6EXT.OLB", and then a message saying "Out of memory", but the Excel (non-VBA) part continues to function. I have tried every "solution" I found on the web, including uninstalling and reinstalling Office, checking the register for entries said be necessary (they were there - no problem), copying said file from its location in Program Files (x86) to same location in Program Files, checking that Office executables are all running under Windows 7 compatibility, and maybe more that I can't remember. Has anyone encountered this issue? I can't think of anything else to try!

Related

Get "Microsoft Excel has stopped working" message

I'm running MS Office 2010 on Windows 7 Professional.
I’ve been experiencing this problem periodically for the last month or so, not all the time, but probably once or twice a week.
I’m working on the VBA portion of a fairly complex workbook. I start the day by making a copy of the previous day’s workbook, and make any subsequent code changes on the copy. When I’m finished I’ll run VBA Code Cleaner, do a Debug, Save then exit Excel. I also save a backup copy. I’ll then reopen & close both of these workbooks a number of times just to satisfy myself that everything is still working.
The next day I’ll wake the computer and try to open these files, and as soon as the VBA code starts to run I’ll get the “Microsoft Excel has stopped working” message. This can happen to either the main file or the backup file, and sometimes both.
If I open the bad file with the shift key down, I can get into the VBE area OK, but when I do a Debug or try to run VBA Code Cleaner I get the same message.
The only way I’ve found to recover from this is to:
Manually export the code
Save the file as an xlsx file, thus expunging all the code.
Save the xlsx file as a new xlsm/xlsb file, and then import the exported code.
I just today found another way to recover is to save the file as “xls”, then re-save as xlsb/xlsm, that somehow seems to “clean” something.
After the recovery everything is fine again, at least for a few days.
What I’ve tried so far:
Searched the internet, including StackOverflow, for possible solution.
Run various virus checkers (MS Essentials, Malwarebytes, SuperAntiSpyware)
Repaired MS Office 2010.
Uninstalled and re-installed MS Office 2010
Removed all add-ins
Uninstalled Dropbox
Started using a new user profile.
I came across several articles that suggested xlsb files were prone to corruption, so I started saving as xlsm files. Everything went well for about a week, and I thought I’d resolved the problem. However, it’s now started happening with the xlsm files too, so I’m back to square one.
I’m running out of ideas - the next thing I might try would be re-installing Windows 7, but I really hope to avoid doing that! I would really appreciate any suggestions. Thanks.
Well, I believe I may have found my problem. I noticed that one of my class objects wasn't always terminating correctly, due to it being referenced in a different class. I fixed that, and now it's been 11 days without any problem (touch wood). So I'm reasonably confident that this was the root cause. But I must admit I'm still not quite sure why this occasionally corrupted the workbook.

Excel crashing randomly

I generate over 100 reports daily in Excel, all with extensive VBA code. Unfortunately, some files are randomly corrupted for no reason that I can define. Either the file will crash immediately upon open, the user will get the "can't find project or library" error, a bad parameter warning will show, or the workbook will be completely unusable as all VBA functions are frozen. In the windows log I will usually see a faulting module for VBE7.dll. I am running Windows 10 Pro, version 10.0.18362 and Excel 64bit with all updates. I've reinstalled MS Office and Windows with no help. I've tried various other fixes (registry changes) that did not help either. This is a random problem as it doesn't happen to every report but it occurs every day to some of them. All can be repaired by opening in safe mode and recompiling the code but this is not something I can expect users to do nor do they have access to the code (all pw protected). I've dealt with this issue for the last two years and nothing has worked. Microsoft has been utterly unhelpful as well. Any help would be greatly appreciated. Additionally, for any true experts out there who could dig into this and find a solution I am certainly willing to pay for your time and expertise. Thank you.
the error saying "can't find project or library" could be traced using ProcessExplorer
That tool will show you what is going on inside MS Excel at the time of opening the file. With luck, you will see what file, dll or complement is not being loaded and throw the error.
Hope it helps,

Random Excel crashes xlsm

In my company I'm using Excel 2013 64bit and many xlsm files with some macros that use basic build in libraries. Occasionally I encounter a random "microsoft excel has stopped working" (- mostly on opening a file but last week it happened while I was just staring at the screen). 95% of the times making a copy of the file, so that excel would not see it as trusted, going to vba editor and compiling vba project manually and saving it would fix the problem, however it recently got simply annoing as frequency of those crashes went from 1/week to several per day. I think I waste like 30 minutes daily just on fixing crashed files. So generally I know what to do when excel crash happens but I would like to know if there's something that can be done to prevent them from happening in the first place.
Also the crashed files work flawlessly on a machine with excel 2010 on it. Saving the file with E2010 also fixes the problem for E2013
64 bit Office has a lot of problems with VB code. These seem to be related to the pcode that get's generated when the code is compiled and so recompiling seems to fix them. There's a registry fix to force recompile, you need to set these two values:
HKEY_CURRENT_USER\Software\Microsoft\VBA\7.0\Common
Type: DWORD
Name: CompileOnDemand
Value: 0
and:
HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Excel\Options\
Type: DWORD
Name: ForceVBALoadFromSource
Value: 1
These two fixed it for me.

Runtime error -2147319784 (0x80028018) with Excel 2013 on Windows 8

I have an Excel application, with lots of macros in it. The macros in the workbook are signed. Some of the macros call Windows API functions and they have been ported to support 32-bit and 64-bit versions of Excel properly. The application works fine on different configurations (Windows XP, Windows Vista, Windows 7, Windows 8, Excel 2003, Excel 2007, Excel 2010, even some Excel 2013).
The application has been developped on a PC with Windows XP and Excel 2007, using the French Canadian locale.
I have one customer that has the following setup:
Laptop with Mac OS/X
Virtual machine with:
Windows 8 English
Excel 2013 English
When he runs my application, he always gets a Runtime error -2147319784 (0x80028018).
I tried to pin point where the error happens and it seems that as soon as the macros execute something referring to the Excel Object Model (for example: Application.ScreenUpdating = False) I get the error.
I tried to copy the exact line of code that fails in a new Workbook and it works fine without any error.
I have already seen a similar behavior in other versions of Windows and Excel with english versions of the products, and the way to solve the problem was to change de regional settings to US English. I tried it on my customer's machine and it didn't work.
I searched the web and found similar issues with Excel 2002 and I found a post in the Microsoft's Knowledge Base (http://support.microsoft.com/default.aspx?scid=kb;en-us;320369). This post applies to .NET VSTO applications, which is obviously not my case here. I can't change the current thread's locale as suggested in the article since this is not available from my VBA macros. I tried to copy the Excel.exe file to a 1033 folder and rename it to xllex.dll as suggested, but it didn't work either.
I even asked my customer to completely uninstall all Office products from his machine and just reinstall Excel 2013. Still doesn't work.
Honestly, I'm running out of options here... Can anyone help me solve this problem?
Thank you for your help!
Ghis
"Windows API functions" in a Mac. Can't imagine that'll work. Is your error this? "Old Format or Invalid Type Library" I'd say your code is not compatible with Mac somehow.
I don't know why the code would fail on a minor issue like Application.ScreenUpdating = False; but you already concluded that line by itself wasn't the problem anyway.
Sounds like you'll need to rewrite your code for the Mac.

Excel opening doesn't work with reuters module giving 'compile error'

I have
Compile error in hidden module: wkbModel
when I try to open Excel (I'm running win xp pro 2002 sp3 with office 2007).
I tried to disable the modules and found that the one causing the problem is Power Plus Pro Excel v5.1 by Reuters. Of course disabling the module makes the program work, but I need this module enabled. Probably this problem has been brought by an automatic update as, until 2 weeks ago, everything worked fine.
I need to find a way to make excel not throwing the compile error while leaving the Reuters module open.
We found this was due to an update to office. Rolled back and everything was fine.

Resources