Starting Macro when starting MS-Project 2003

R

Robert

Hello,

Does anyone know how to start a macro when Project is starting or by opening
a new projects. Something like a autoexec macro in Word. I can start thje
example code below from the menu Tools->macro-macros-> run and the it works
fine, but the idea is not to start it manually.

Public WithEvents pApp As MSProject.Application

Private Sub Class_Initialize()
Set pApp = New MSProject.Application
End Sub

Private Sub pApp_ProjectBeforeSave(ByVal pj As Project, ByVal SaveAsUi As
Boolean, Cancel As Boolean)
MsgBox "hello"
End Sub


Sub Register_Event_Handler()
Set X.pApp = MSProject.Application

End Sub
 
J

Jan De Messemaeker

Hi Robert,

See my reply in the Dutch NG.
Cross-posting is generally not necessary.
Greetings,
 

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