View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default how to make a form self disappear

In the form's code module, use

Private Sub UserForm_Initialize()
Application.OnTime Now + TimeSerial(0, 0, 5), "HideForm", ,
True
End Sub

Change the '5' to the number of seconds you want to display the
form.

In a standard code module,

Sub HideForm()
UserForm1.Hide
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Ben" wrote in message
...
Hi all,

I am using Excel 2002. I would like to display a form when a
worksheet is
activated. But after a few seconds have elapsed, I would like
the form to
unload itself. Can you please share with how I can accomplish
this? Thanks.

Ben


--