event re

N

Niclas Rothman

Hi experts, I´m a total newbie on the capabilities of MS project server.
However I wonder if it is possible to register a listener on various events,
e.g when a task is delted in a project, when to task´s are grouped etc...

Thanks

Niclas
 
M

Maruf

Niclas,
Open Visual Basic Editor (Alt + F11).
1. Insert a New Class Module, say, EventClassModule.
2. Declare a member in the EventClassModule: Paste the follwing code:
Public WithEvents App As Application
Also, you will be able to see Project Events in the events dropdown, pick
up any and write some code.

3. In the Project Objects, double click this project and paste the
following code:

Dim x As New EventsClassModule


Sub InitializeApp()
Set x.App = Application
End Sub

Private Sub Project_Open(ByVal pj As Project)
InitializeApp

End Sub


That's it.
It will work. Let me know if you have problems, i will email you the mpp
file with source code. <[email protected]> is my email.

Thanks,
Maruf
 

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