Show a message but not in MsgBox

  • Thread starter Thread starter RobN
  • Start date Start date
R

RobN

Is there a way to show a message during the running of some VB, for a period
of time and that a button doesn't need to be clicked to close the message?

Rob
 
Hi,

Do it with a userform.

Create a userform with whatever message you want and use this code

Sub sonic()
'doing your stuff
UserForm1.Show
'do more stuff
End Sub

Sub KilltheForm()
Unload UserForm1
End Sub

Then in the userform code use this

Private Sub UserForm_Activate()
Application.OnTime Now + TimeValue("00:00:05"), "KilltheForm"
End Sub

The form will display for 5 seconds and then unload

Mike
 
Thanks Mike.

I'm a bit of a duffer - I've used UserForms in the past to do just that and
forgot about it.

However, I'd still like to know if there was a "better" way as, unless I do
something wrong with the UserForm, the UserForm appears with the usual big X
in top right cnr, and I'd like the message to look a little more
proffessional - without the cross.

Thanks too for the bit of code that causes the 15 sec delay.

Rob
 

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

Back
Top