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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to display a message for 1 second?

Status
Not open for further replies.

Gerrit Broekhuis

Programmer
Aug 16, 2004
316
NL
Hi,

I want to display a message in my VBA Outlook code for 1 second. MsgBox() is not what I want to use, since I have to press or click a button before the message disappears.

How do I display a message for just 1 second. In Visual Foxpro I use "wait window "message" timeout(1), but what is the VGA equivalent? Must be something simple, I presume...

Regards, Gerrit
 
there is a WshShell.Popup which has the ability to display for a defined time
 
Hi, mrmovie,

WshShell.Popup adds at least one button to my message. I only want to display the message, without buttons, without title, etc..

Regards, Gerrit
 
Hi, mrmovie,

Maybe, but how should I display a form with just a label (and no buttons...) I also tried WshShell.Echo, but this doesn't work in Outlook VBA

Regards, Gerrit
 
Create a userform in the VBE

To pop it up, use

UserformName.SHOW


To time 1 minute, have a look at the WAIT command in VBA help

To get rid of it, use

UserformName.HIDE

Rgds, Geoff

"Three things are certain: Death, taxes and lost data. Guess which has occurred"

Please read FAQ222-2244 before you ask a question
 
Have a look at the API function GetTickCount. I've even used this to make Excel 'sing' by using it "in concert", so to speak, with the Beep command. I've found it as good a way as any when it comes to timing.

HTH
smiley_pc.gif
 
Hi.
Create a form and in it's initialize event put the method "Ontime" set on 1 second (Take a look in vb help).
Hope this helps.
Regards
Nick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top