Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / General Excel Questions / May 2008

Tip: Looking for answers? Try searching our database.

Show a message but not in MsgBox

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
RobN - 30 May 2008 09:08 GMT
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
Mike H - 30 May 2008 10:08 GMT
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

> 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
RobN - 30 May 2008 23:58 GMT
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

> Hi,
>
[quoted text clipped - 28 lines]
>>
>> Rob
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.