On Open

D

DavidC

Hi,

I have a desire (need?) to update the statusdate when my project opens. I
have the code to update the statusdate and that works fine. I also have a
msgbox in the code that prompts first to update the date and that works. The
code works fine when run from a button on the toolbar, but I would like it to
run on project open.

I have it in a proceedure "Private Sub Project_open (ByVal pj as Project)"

but that does not run when I open the project. I know this because the
msgbox does not pop up.

The project is a master/sub master arrangment, and it is the master project
I want to update at this stage. (I will progress it through to the sub
masters later).

Any thoughts will be most welcome.

Regards

DavidC
 
J

Jan De Messemaeker

Hi,

Is the private sub stored in the ThisProject module of the file to be
opened?
 
D

DavidC

Hi,

Thanks for your reply. Yes the routine is in a module in the master project
which is the one being opened not the sub projects.

Regards

DavidC
 
J

Jan De Messemaeker

Hi,

Your reply worries me.
It is not about "A" module
It has to be in THE "This Project" module.
HTH
 
D

DavidC

Hi Jan,

And so it should worry you. My apologies, I should have read it more
closely and recognised that you were referring to writing the code
essentially into 'Thisproject' object and NOT into a module.

Now that I have woken up and considered your reply better, made the change,
it now works.


Thanks a heap
 
J

Jan De Messemaeker

Hi David,

Glad to have been of help
And yes, "ThisProject" is an object not a module but it does look like,
sorry for the confusion.

Greetings,
 

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