Using BeforeSave event on EPM file

J

James from Sage

I'm using EPM Server 2003.

My BeforeSave event handler doesn't work when I use it in a file that I open
from EPM.

Same code works fine in a MS Project file stored on my desktop.

Thanks,

- James
 
C

Chak

I'm using EPM Server 2003.

My BeforeSave event handler doesn't work when I use it in a file that I open
from EPM.

Same code works fine in a MS Project file stored on my desktop.

Thanks,

- James

James,

Please make sure that you added the VBA code to enterprise global and
save the enterprise global. After you add the VBA code, close the MS
Project Pro application and relaunch to populate the VBA on your
project plan.

Thanks
Chak
 
J

James from Sage

Hi Chak,

Do I put the code in ThisProject section of Global.mpt, ThisProject section
of VBA Project (Global(+ non-cached Enterprise)) and the ThisProject section
of the file itself. I Published all, saved and re-opened but still, no luck
using the following code:

Private Sub Project_BeforeSave(ByVal pj As MSProject.Project)
MsgBox "Project Just Saved - (testing BeforeSave event handler)"
End Sub

Thanks,

- James
 
C

Chak

Hi Chak,

Do I put the code in ThisProject section of Global.mpt, ThisProject section
of VBA Project (Global(+ non-cached Enterprise)) and the ThisProject section
of the file itself. I Published all,  saved and re-opened but still, no luck
using the following code:

Private Sub Project_BeforeSave(ByVal pj As MSProject.Project)
  MsgBox "Project Just Saved - (testing BeforeSave event handler)"
End Sub

Thanks,

- James






- Show quoted text -

Hi James,

You might be did correct. But just to make sure, verify the following
steps to add the macro to enterprise global.


1) Open the Enterprie Global (Open MS Project Professional -> Tools ->
Enterprise Options -> Open Enterprise Global)

2) Tools -> Macro -> Visual Basic Editor

3) Left pane look for VBA Project (Checked-out Enterprise Global) and
double click

In the code window, place the following code:

Private Sub Project_BeforeSave(ByVal pj As MSProject.Project)
MsgBox "Project Just Saved - (testing BeforeSave event handler)"
End Sub

4) Save Enterprie Global

5) File -> Close and return to Microsoft Project

5) File -> Exit to close the MS Project Pro (Click "no" to if any
prompt to save Project 1)

6) Launch MS Project Pro

7) Open any project plan and click Save ( you should see the msgbox
here)


Thanks
Chak
 
J

James from Sage

Hi Chak,

Your instructions were easy to follow and I was able to add the code to the
Enterprise Global.

I don't get the message, however, until after I've clicked to close down
MSProject after saving, publishing and closing the file.

Thanks,

- James
 

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