View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Automatically close Userform

In the workbook_open event activate the userform with something like

userform1.show

then in the userform_activate event paste this code.

Private Sub UserForm_Activate()
PauseTime = 5 ' Set duration in seconds
Start = Timer ' Set start time.
Do While Timer < Start + PauseTime
Loop
Finish = Timer
UserForm1.Hide
End Sub

Mike


"SU" wrote:

I have an userform that I would like to show and be visible for 5 seconds
when opening an Excel file.

I would just like to show the userform for a certain length of time and
would like it to close without any interaction from the user.

Would appreciate all help. Many thanks in advance.