The macro name.ThisOutlookSession.DisplayMyForm cannot be found.

M

Mitch

So from time to time I run into this error, I click the macro button that was
created and get this error. If I close OUTLOOK 2003 sp3 and restart it may
work 4/5 times.. this has occured to 2 other systems for the same macro.

If I load the macro editor (Alt+F11), it does nothing.

Any suggestions would be greatly appreciated.

This is the code for the button

Public Sub DisplayMyForm()
TrainForm.Show vbModaless
End Sub


Odd thing is when I went to current Macro's it found none (Trying to edit /
look at the button). Restart Outlook and now it works. It's as if it totally
missed loading the macros from the start.
 
S

Sue Mosher [MVP]

It's not a bad idea to include some code in the Application_Startup event
handler in ThisOutlookSession, just to give VBA a little nudge to load. It
can be as simple as a Debug.Print statement.
 
S

Sue Mosher [MVP]

Your guess may be on the right track: If another application starts Outlook
without UI, VBA may not load. If you shut down and restart Outlook, use the
Windows Task Manager to make sure outlook.exe has completely shut down before
restarting.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top