Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automate VBA Macro?

Status
Not open for further replies.

MissV

MIS
Jan 21, 2004
3
GB
I was wondering if anyone can help I am fairly new to VBA and need some assistance with a little coding issue please. I have a VBA script/macro which copies the summary bar in a MSP 2002 plan into a particular task within the same plan, this script works fine however I would like to activate the script/macro automatically on saving the file, is this possible and if so how?

Thanks, your help is much appreciated.
Ms MIS
 
Hi
I've never worked with Project before but I'd guess that there is a BeforeSave event attached to the Project Object.

Open the VBE (ALT+F11) then highlight your project in the project explorer, right click on it and choose "View Code" or similar!

In the left hand dropdown in the code window choose project (or however it's labelled) and in the right hand dropdown you should have a list of available events.

If BeforeSave is listed, click on it a and put your code in the routine that is created for you. If BeforeSave isn't listed, then I'm afraid I can't help!!

;-)
If a man says something and there are no women there to hear him, is he still wrong? [ponder]
How do I get the best answers?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top