PDA

View Full Version : Excel/VBA crash



Johannes
09-07-2004, 10:20 AM
Quite often when I work in VBA writing code (or whatever..) Excel crashes and I have to use Task Manager to end the process. This happens both on my home PC running Win XP and on my Office PC running Win 2000. Is this something that happens to others as well, and in case, is there anything obvious that I may be doing wrong? Any ideas of how I can find out what the problem is would be appreciated....
:roll:

Jacob Hilderbrand
09-07-2004, 02:11 PM
Does it happen when you run certain code? If so post the code here. If it just happens randomly, I would say to first try the detect and repair feature of Office, then if that doesn't work, reinstall Office.

Its strange that it happens on two different PCs. Make sure you run an antivirus program, and get all the security updates for your OS and Office from Microsoft.

Also try uninstalling all addins to see if maybe one of them is causing a problem.

Ken Puls
09-07-2004, 04:11 PM
Hi Johannes,

I have seen this kind of problem, before, or at least a variation of it.

I had an issue when using a late bind to launch an instance of Word to mailmerge, then close it. For whatever reason, it left me with a hidden instance of Excel when I quit Excel. I never did get it resolved, but you can check out my thread at MrExcel.com if you're interested:
http://www.mrexcel.com/board2/viewtopic.php?t=70684&postdays=0&postorder=asc&start=13

Cheers,

jamescol
09-07-2004, 04:31 PM
Be sure your Office is up-to-date with the latest patches. Also, this happened to me while writing VBA code early on, before I realized I had to clean up all those objects. I, too, wound up with MANY hidden versions of Excel and Word that ultimately caused my PC to crash.

Cheers,
James

Johannes
09-09-2004, 10:48 AM
Thank you guys for your advice. I'm currently trying to look into the various possibilities but for an amateur like me it all takes a hell of a lot of time. (pardon my french..)

I may well end up posting my code here, but as I am a bit embarrassed of the 'unprofessionalism' of my code.. I'll end up being the biggest amusement on this forum..

Ken Puls
09-09-2004, 10:53 AM
Hi Johannes,

Personally, I really wouldn't worry about the "professionalism" or your code. You should see some of the stuff I've written in the past! :)

We all start somewhere, and I highly doubt anyone here will laugh at you! As a matter of fact, I'm kind of curious to see what you have, and what solutions can be found. You never know when this kind of knowledge will come in useful!

Cheers,

Zack Barresse
09-09-2004, 10:55 AM
... I may well end up posting my code here, but as I am a bit embarrassed of the 'unprofessionalism' of my code.. I'll end up being the biggest amusement on this forum..


Hey, you should see some of my code! :p Seriously, don't worry about it! Just be sure and enclose your code in the [ VBA ] & [ /VBA ] tags (no spaces), see picture below ...

Johannes
09-09-2004, 11:32 AM
Thanks for reassuring me. Although I know I write awful spaghetti code I also know that I sometimes build nice working solutions to problems!! :rofl

Funny thing is, after I posted my thread this lock situation has not happened again! But I promise that I'll post my code whenever it happens next... Better get started tidying it up a bit..