how to set a specific ms project as ActiveProject

J

Joy

we wrote some macros, and at the beginning, a ms project file is opened.
during the operation, several files will be opened. after that, we want to do
some operation on the 1st file. but at the time, it seems ActiveProject is
the last file opened.

how can I go back to the first opened file to continue operation on it


thanks
 
J

Jack Dahlgren MVP

Start your macro then


dim firstProject as Project
set firstProject = ActiveProject

Any time you need to refer to that project just use firstProject

ie:

firstProject.Activate
....
for each task in firstProject
....


-Jack
 
J

Joy

thanks

Jack Dahlgren MVP said:
Start your macro then


dim firstProject as Project
set firstProject = ActiveProject

Any time you need to refer to that project just use firstProject

ie:

firstProject.Activate
....
for each task in firstProject
....


-Jack
 

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