VBA - On Save Event

P

Paul Conroy

Winproj 12 (SP1 plus latest hotfixes)

Macros placed in the On Save event are running twice. Once on saving the
plan and again on exiting the app. Is there a way I can prevent it from
running when exiting the application ?

Thanks

Paul
 
R

Rod Gill

I don't understand why your project is saving automatically on exit, but you
could test the Last Saved date property and only continue the macro if a
certain time has passed since the last save.

See activeproject.LastSaveDate


--

Rod Gill
Microsoft MVP for Project

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

Rod Gill

Hi Paul,

You can test the pj value passed as a parameter.

If not pj is nothing then

This should catch the no project loaded problem.

--

Rod Gill
Microsoft MVP for Project

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

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