A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

The macro name.ThisOutlookSession.DisplayMyForm cannot be found.



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old October 16th 09, 11:21 PM posted to microsoft.public.outlook.program_vba
mitch
external usenet poster
 
Posts: 47
Default The macro name.ThisOutlookSession.DisplayMyForm cannot be found.

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.
Ads
  #2  
Old October 16th 09, 11:33 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP][_4_]
external usenet poster
 
Posts: 552
Default The macro name.ThisOutlookSession.DisplayMyForm cannot be found.

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.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Mitch" wrote in message
...
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.



  #3  
Old October 19th 09, 01:28 AM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP][_4_]
external usenet poster
 
Posts: 552
Default The macro name.ThisOutlookSession.DisplayMyForm cannot be found.

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.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54



"Mitch" wrote:

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.

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Question on ThisOutlookSession or OutAddIn.cls methods. paresh Outlook and VBA 1 October 13th 09 03:58 PM
Start event from ThisOutlookSession Maurice Outlook and VBA 1 August 22nd 08 03:54 PM
ThisOutlookSession - code runs only once Rafael1119 Outlook and VBA 8 July 17th 06 11:51 AM
ThisOutlookSession not starting Wanda Outlook and VBA 2 June 9th 06 07:48 PM
Vba Project OTM - Thisoutlooksession(code) error XP User Outlook and VBA 4 May 7th 06 03:31 PM


All times are GMT +1. The time now is 06:11 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2024 Outlook Banter.
The comments are property of their posters.