Circumventing a MSP Message

  • Thread starter Conrad Santiago
  • Start date
C

Conrad Santiago

I created a macro that publishes New and Changed Assignments on multiple
projects consecutively. The macro stops when this MSP message box comes up:

"There are no items to be published...."

1. Is there a way to OK this message when it comes up through a macro?

2. If not, is there a way to turn off these messages, so that they don't
come up?

As you can imagine, this is a pain, because I have to watch the macro run
and click <Enter> when the message pops up. For 100 projects, that's a half
hour vigil.

Thanks in advance for any responses.
--Conrad Santiago
 
J

John

Conrad Santiago said:
I created a macro that publishes New and Changed Assignments on multiple
projects consecutively. The macro stops when this MSP message box comes up:

"There are no items to be published...."

1. Is there a way to OK this message when it comes up through a macro?

2. If not, is there a way to turn off these messages, so that they don't
come up?

As you can imagine, this is a pain, because I have to watch the macro run
and click <Enter> when the message pops up. For 100 projects, that's a half
hour vigil.

Thanks in advance for any responses.
--Conrad Santiago

Conrad,
There are several ways to handle this type of problem. I haven't dealt
with publishing so I don't know which approach may be best but here are
three possibilities. Try them in the order listed.
1. Try the DisplayAlerts property. Set it to False.
2. Use code to test for changes yourself so the message never pops up.
3. Try the SendKeys Statement

Hope this helps.
John
Project MVP
 
C

Conrad Santiago

Great tips, guys!

I took John's advice and added the Application.DisplayAlerts = False to the
macro and it's working great!

If I use Ed's tip, I can probably cut the macro running time in half. Right
now, I have it so that it opens and saves each project regardless of whether
it needs the publishing or not. If I test the tasks first, I wouldn't need
to save.

Thanks, again!

--Conrad Santiago
 
J

John

Conrad Santiago said:
Great tips, guys!

I took John's advice and added the Application.DisplayAlerts = False to the
macro and it's working great!

If I use Ed's tip, I can probably cut the macro running time in half. Right
now, I have it so that it opens and saves each project regardless of whether
it needs the publishing or not. If I test the tasks first, I wouldn't need
to save.

Thanks, again!

--Conrad Santiago


Conrad,
Great! I'm glad our advice was useful. And yes, a few ounces of checking
code can go a long way in making your macros more efficient and user
friendly.

John
 

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