Coding in the Project_Open Event

D

Dustin Ventin

The long story goes like this:

My client wants a report that displays a variety of data from a group of MSP
projects all saved in an MDB file, including the Baseline Created date.
However, because the Baseline Created date is not saved in the Access tables,
I need to find another way of accessing it. I tried opening each MSP project
individually and adding the report, but because of the great number of
projects involved this is too slow of a solution.

I've struck upon another idea...I want to add a field to the database to
hold the Baseline Created date (we already have dozens of custom tables
already). Then I would write a macro that will save the Baseline Created
date into this field whenever a certain event goes off. Now, I'm trying to
start simple and just have a messagebox appear when the program opens:

Private Sub Project_Open(ByVal pj As Project)
msgbox("This is a test!")
End Sub

However, nothing happens. I've tried this same code in multiple projects on
multiple computers. I've even checked out some web sites about writing this
kind of code, and it all looks like it should be this simple.

Short story goes like this:

How do I get code to run in the Project_Open event?

Thank you,

Dustin
 
R

Rod Gill

Hi,

The code is in the ThisProject file? Press Ctrl+R to show the Project
Explorer. Open the Microsoft Project Objects folder to see the ThisProject
file.

--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:
http://www.projectvbabook.com
 
P

ProjmanZA

Hi,

The code is in the ThisProject file? Press Ctrl+R to show the Project
Explorer. Open the Microsoft Project Objects folder to see the ThisProject
file.

--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:http://www.projectvbabook.com














- Show quoted text -

Hey there ,

Try your post Microsoft.public.project.developer

:)
 

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