how to give status msgs during macro execution???

J

Joy

we have written serveral macroes.
we want to let our user know that the macro is running

sometimes the project is very big, and the macro take a long time to execute

we just want to show some msg like 'please wait'
or if ever timed out, we also give such msg.

I am just wondering how to do it ...

thanks.
 
R

Rod Gill

Two methods I have used are:
1) Show a blank project and write status messages in Task 1. This message
was especially useful before Project VBA got the ScreenUpdating=false method
as it eliminated time needed to update the screen.
2) Create a Userform in VBA that shows status messages.

--

Rod Gill
Microsoft MVP for Project

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

Joy

good idea

I can do #2, but for #1, could you please knidly tell me how to do it??

how to show a new project , and wirte msg in task 1,


thanks...
 
J

Joy

another question is

can i let the userform (msg box) always stay at the same place with the
cursor??

thanks
 
R

Rod Gill

Hi,

Simply create a new project and write to task 1's name field. You need to
create a project variable to point to your main project so you can continue
to reference it.

To move the UserForm to stay alongside the cursor you will need to use
Windows API's as that can't be done with Project VBA. Search the web for
examples.

--

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