VB Editor Crashes outlook
I've been playing with writing outlook macros and prototyping various ideas for a project I'm about to start. Everything was fine until about 1/2 hour ago when outlook started crashing every time I open the vb editor. Does anyone have any idea why this is happening?
It might be something to do with the last thing I tried which was instantiating a customer form in the startup method but then I'd expect it to crash when I fire up outlook - instead it fires up fine but CTDs when I open the vb editor.
Deleting the vbaProject.otm means I can open the editor again but, of course, all my work is lost :(
Re: VB Editor Crashes outlook
Browse in Explorer to your vbaproject.otm location -
C:\Documents and Settings\VB-Guru\Application Data\Microsoft\Outlook
Then make a backup copy of it and name it accordingly.
Then delete your vbaproject.otm file (After you close Outlook) and then re open Outlook and see iif you can open the VBA IDE again without it crashing.
If you can open it then your original otm file was corrupt. You can possibly recover the code by adding a class to your new project and selecting
your backup copy of your otm. If you still cant do it then you may be able to read some of the data in the original otm file by using Wordpad or
Notepad to open it with. Its nothing more then an encrypted textfile.
Re: VB Editor Crashes outlook
Hi Rob,
yep the ide opens if I delete the otm.
I was only prototyping so losing my work isn't too big a deal but I was more worried about the fact it seemed to keep happening so I couldn't progress.
From a bit of experimentation I think it was something to do with including a dbGrid on the form as this always seemed to be the last control I added. I've switched to a datagrid and no longer seem to be getting the problem (fingers crossed). Mind you, when explicitley testing it I was able to add a dbGrid and not get the crash (until about 1/2 hour later :mad: ) so it could be a complete red herring.
Re: VB Editor Crashes outlook
DBGrid huh, hmm, could it be that it was bound to an invalid source?
Re: VB Editor Crashes outlook
Actually that's quite likely. I was playing/learning my way around it's datasource so it's quite likely I just plain got it wrong. Thx