Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA Compiler Error Cause Excel to Crash

About an hour ago, Excel started crashing when ever a VBA compiler error
was encountered. I did a little testing and the following happens
every time
1. there is a problem in a macro, could be as simple as a misspelled
variable (Option Explicit is "on")
2. when the macro compiles, it stops at the problem and displays the
normal ambiguous error mesaage
3. I look at the error and fix it (or not, does not matter)
4. I exit the VBE and get the message that this will stop the
debugger
5. I click OK and Excel crashes about 5 seconds later with the
wonderful "Microsoft Excel for Windows has encountered a problem and
needs to close"

Once I have this crash, many other things cause a similar crash, e.g.,
just closing a spreadsheet. If I reboot, I can do normal things, but
if I have a VBA compiler error, the process starts again.

Does anyone have any idea what is going on here?

Thanks


---
Message posted from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default VBA Compiler Error Cause Excel to Crash

MWE,

Sounds like one of the VBA DLL files got corrupted. I'd uninstall
then reinstall.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"MWE " wrote in message
...
About an hour ago, Excel started crashing when ever a VBA

compiler error
was encountered. I did a little testing and the following

happens
every time
1. there is a problem in a macro, could be as simple as a

misspelled
variable (Option Explicit is "on")
2. when the macro compiles, it stops at the problem and

displays the
normal ambiguous error mesaage
3. I look at the error and fix it (or not, does not matter)
4. I exit the VBE and get the message that this will stop the
debugger
5. I click OK and Excel crashes about 5 seconds later with the
wonderful "Microsoft Excel for Windows has encountered a

problem and
needs to close"

Once I have this crash, many other things cause a similar

crash, e.g.,
just closing a spreadsheet. If I reboot, I can do normal

things, but
if I have a VBA compiler error, the process starts again.

Does anyone have any idea what is going on here?

Thanks


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default VBA Compiler Error Cause Excel to Crash

With Excel closed,
Try deleting files in your temp directory and subdirectories under temp that
appear to be related to Excel or VBA.
Then reboot.
--
Regards,
Tom Ogilvy

MWE wrote in message
...
About an hour ago, Excel started crashing when ever a VBA compiler error
was encountered. I did a little testing and the following happens
every time
1. there is a problem in a macro, could be as simple as a misspelled
variable (Option Explicit is "on")
2. when the macro compiles, it stops at the problem and displays the
normal ambiguous error mesaage
3. I look at the error and fix it (or not, does not matter)
4. I exit the VBE and get the message that this will stop the
debugger
5. I click OK and Excel crashes about 5 seconds later with the
wonderful "Microsoft Excel for Windows has encountered a problem and
needs to close"

Once I have this crash, many other things cause a similar crash, e.g.,
just closing a spreadsheet. If I reboot, I can do normal things, but
if I have a VBA compiler error, the process starts again.

Does anyone have any idea what is going on here?

Thanks


---
Message posted from http://www.ExcelForum.com/



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA Compiler Error Cause Excel to Crash

Chip/Tom: thanks for your replies. I tried Tom's (simpliest) but tha
did not help. Before I tried uninstalling and reinstalling Excel,
spent some time backtracking to the original problem and also wen
"sideways" to see how many Excel applications would misbehave (use
copies). Every Excel appl I opened had the same problems; many faile
as soon as I hit the enable macro button. Reinstalling Excel fixed th
problem with all appls except the one that started it all. It wa
still messed up and I ended up deleting it and going back to an earlie
version (luckily I had done a backup of that drive yesterday).
believe that the root cause was an attempt to dupliicate Publi
declaration from a base application in an Add-in specificall
constructed to hold a subroutine library used by the base applicatio
and several sister applications (you both replied to my thread abou
global common). When I started testing the base application after
did that, Excel puked and I spent the next 5 hours trying to figure ou
what went wrong. Any idea why that action would create such havoc?

Thank

--
Message posted from http://www.ExcelForum.com

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
2003 macro generates compiler error on 2007 KenInPortland Excel Worksheet Functions 2 September 2nd 08 09:45 PM
Compiler Error - Not an Appropriate Name pallaver Excel Discussion (Misc queries) 1 July 16th 08 02:20 AM
Compiler Error Bobzter100 Excel Discussion (Misc queries) 4 November 10th 07 11:02 AM
Excel Compiler - is one available? John Baker Excel Programming 11 October 25th 03 01:33 PM
Compiler Error - Named Argument Not Found Chris Excel Programming 7 September 8th 03 10:15 PM


All times are GMT +1. The time now is 02:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"