View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Automatically close a userform

The Wait will not execute until the form unloads when it is inline. Put that
code in the Userform Activate event of the userform

Private UserForm_Activate()
Application.Wait (Now() + TimeValue("0:00:04"))
Unload UserForm2
End Sub

--

HTH

RP

"ForSale" wrote in message
...

The following isn't working. what am i doing wrong?

UserForm2.Show
Application.Wait (Now() + TimeValue("0:00:04"))
Unload UserForm2

I'm trying to pop up a userform for 4 seconds, then close it.
I initally added some basic shapes - a rectangle and three arrows - and
did the same thing. it worked the first time, but then they wouldn't
pop up anymore, but that's not important.
thanks.


--
ForSale
------------------------------------------------------------------------
ForSale's Profile:

http://www.excelforum.com/member.php...o&userid=11896
View this thread: http://www.excelforum.com/showthread...hreadid=265660