LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Display and close form automatically

Here's some code I'm working on. I want to display a message to the
user for approximately 3 seconds and then continue on with the code.
I've built a form with a message written on it. When i run this code
the form displays and then it doesn't do anything. The Sleep
function works fine.........I just don't know how to get the form to
close automatically.



On Error Resume Next

Shell BankNamePath, vbMaximizedFocus

If Err.Number = 5 Or Err.Number = 53 Then

UserForm1.Show
Sleep 3000
Unload UserForm1

Call OpenDefaultDiscTray
Sleep 5000
Call CloseDefaultDiscTray

Shell BankNamePath, vbMaximizedFocus

End If

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you automatically display a vba form in excel 2007 Kathryn Excel Discussion (Misc queries) 1 April 21st 10 04:51 PM
Close form automatically upon opening workbook Ixtreme Excel Discussion (Misc queries) 2 September 18th 09 02:56 PM
automatically close form before closing Horatio J. Bilge, Jr. Excel Discussion (Misc queries) 0 September 19th 08 08:26 PM
Is it possible to have a messageBox to display for 2 sec's and then Close AUTOMATICALLY ? Corey Excel Programming 3 February 26th 07 01:18 AM
In Excel how can a number automatically display in text form Curtis A Excel Worksheet Functions 2 February 26th 05 11:31 AM


All times are GMT +1. The time now is 08:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"