macro event handler requirement

N

NDCOURT

I'm using Project Standard 2003 and trying to write a
macro that uses conditional if statements to determine
whether I continue with the file open or close the
application. I want this to be automated such that I open
a Project file with a script, automatically run a macro,
and if no user interaction occurs within a certain period
of time, close the application.

Does project have any sort of events that can be raised so
that I can use an event handler for a conditional if
statement?
 
J

Jan De Messemaeker

Hi,

Yes.
The Open event is particularly easy to use
You cna put it in Global.mpt (will fire at every Project opened) or in a
Project
Go into the vBEditor
In the Project explorer select the Global or the Project
In Microsoft Project objects find ThisProject, double-click.
The upcoming window has two drop-down selectors
In teh left one select Project
In the right one select Open
Put the code in teh Private Sub that ccomes up.
HTH
 
N

NDCOURT

Thank you for your response.However, it doesn't solve the
problem...

I am already using the Open event you describe below to
run a macro when the file opens. It is after this point
that I have the issue. I want to then determine if a user
has made an input (such as a mouse click) to route further
processing in a conditional statement. If no user
interaction occurs in a given time period, I want the
macro to then take a different conditional statement.
 
J

Jan De Messemaeker

Hi,

A bit long to explain here.
Lookup the article in Help
Using Events with the Application object.
HTH
 

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