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
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