Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default Close userform after 2 seconds

I load an userform when the workbook opens. Does anybody know some code which
automatic can unload the userform after some seconds ?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default Close userform after 2 seconds

Kent,
Try this:

Sub ShowForm()
UserForm1.Show vbModeless
Application.OnTime Now + TimeValue("00:00:02"), "Unload_Form"
End Sub

Sub Unload_Form()
UserForm1.Hide
End Sub

"Kent" wrote:

I load an userform when the workbook opens. Does anybody know some code which
automatic can unload the userform after some seconds ?

Reply
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
Userform + close button Chip Smith Excel Discussion (Misc queries) 2 April 1st 06 09:35 AM
Automatically close a userform ForSale[_55_] Excel Programming 1 October 2nd 04 12:39 PM
Automatically close a userform ForSale[_54_] Excel Programming 1 October 2nd 04 04:11 AM
Automatically close a userform ForSale[_53_] Excel Programming 1 October 2nd 04 12:47 AM
Close a userform Alvin Hansen[_2_] Excel Programming 1 September 26th 04 12:56 PM


All times are GMT +1. The time now is 07:36 PM.

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"