Close msgbox ?

B

Buddy Lee

Is it possible to close a msgbox that contains no buttons ?
e.g.
msg = "Please wait ..."
style = vbInformation
title = "something ... :)"
msgbox(msg, style, title)
..
..
.. 'some code

than I need to close the msgbox automatically

I know that another way is to insert a UserForm and show it and hide.
 
B

Bob Phillips

It is not possible to have a MsgBox without buttons. Even a style of
vbInformation gives an OK button.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
S

ste mac

Buddy said:
Is it possible to close a msgbox that contains no buttons ?
e.g.
msg = "Please wait ..."
style = vbInformation
title = "something ... :)"
msgbox(msg, style, title)
.
.
. 'some code

than I need to close the msgbox automatically

I know that another way is to insert a UserForm and show it and hide.

Hi, can't help you with the no button thing, but the code below will
automatically
close the msgbox after 3 seconds... hope this helps

ste

Sub closemsgbox()
With CreateObject("Wscript.Shell")
.Popup "This message will be displayed for 3 seconds" _
, 3, "Self Closing MsgBox", 64
End With
End Sub
 
B

Buddy Lee

thx

--

icq 25372592
ste mac said:
Hi, can't help you with the no button thing, but the code below will
automatically
close the msgbox after 3 seconds... hope this helps

ste

Sub closemsgbox()
With CreateObject("Wscript.Shell")
.Popup "This message will be displayed for 3 seconds" _
, 3, "Self Closing MsgBox", 64
End With
End Sub
 

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