P
Paul Dunleavy
I have Project_Open event handler in 'This Project' in my Global.mpt.
I am using MS Project Professional 2002.
The event fires (at the moment I have set it to pop up a MsgBox), if I
select to work offline on opening project.
If I connect to my Project Server account on opening, the event does
not fire.
I presume this is something to do with the '(Global (+ cached
Enterprise))' project that gets created by merging with the Enterprise
Global Template, which does not show my event handler code when I
click on its 'This Project' object.
I am trying to regisater an Application event handler class, which can
work across projects, when I am connected to project server, without
repeating the code in each project. (It works fine from individual
projects.) Perhaps there is a different way of achieving this?
Thanks in advance.
Paul
-----
Option Explicit
' Reference to the EventHandler class.
' Instantiated by the Project_Open event.
Dim theEventHandler As Global_ApplicationEvents
Private Sub Project_Open(ByVal pj As Project)
' Event handler called when the mpt is opened.
MsgBox "In the Global.mpt Project_Open() event."
Set theEventHandler = New Global_ApplicationEvents
Set theEventHandler.theApp = Application
End Sub
I am using MS Project Professional 2002.
The event fires (at the moment I have set it to pop up a MsgBox), if I
select to work offline on opening project.
If I connect to my Project Server account on opening, the event does
not fire.
I presume this is something to do with the '(Global (+ cached
Enterprise))' project that gets created by merging with the Enterprise
Global Template, which does not show my event handler code when I
click on its 'This Project' object.
I am trying to regisater an Application event handler class, which can
work across projects, when I am connected to project server, without
repeating the code in each project. (It works fine from individual
projects.) Perhaps there is a different way of achieving this?
Thanks in advance.
Paul
-----
Option Explicit
' Reference to the EventHandler class.
' Instantiated by the Project_Open event.
Dim theEventHandler As Global_ApplicationEvents
Private Sub Project_Open(ByVal pj As Project)
' Event handler called when the mpt is opened.
MsgBox "In the Global.mpt Project_Open() event."
Set theEventHandler = New Global_ApplicationEvents
Set theEventHandler.theApp = Application
End Sub