Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Vba - automaticaly closing userform
Hi all,
i need to close the userform after 2 seconds. Could anybody help me? Thanks. Iam trying something like this: Private Sub UserForm_Initialize() Dim cTime As Long Dim WSH As Object Set WSH = CreateObject("WScript.Shell") cTime = 1 Wait cTime '????? Unload Me End Sub --- Message posted from http://www.ExcelForum.com/ |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Vba - automaticaly closing userform
In a standard module:
Sub ShowForm() UserForm1.Show End Sub Sub KillForm() Unload UserForm1 End Sub In the userform1 module: Private Sub UserForm_Initialize() Application.OnTime (Now + TimeSerial(0, 0, 2)), "KillForm" End Sub HTH. Best wishes Harald "ajliaks " skrev i melding ... Hi all, i need to close the userform after 2 seconds. Could anybody help me? Thanks. Iam trying something like this: Private Sub UserForm_Initialize() Dim cTime As Long Dim WSH As Object Set WSH = CreateObject("WScript.Shell") cTime = 1 Wait cTime '????? Unload Me End Sub --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Userform won't show after closing another file | Excel Discussion (Misc queries) | |||
Re-show userform after closing file - code help | Excel Discussion (Misc queries) | |||
Closing the Userform when macro is running | Excel Programming | |||
userform titlebar and closing form | Excel Programming | |||
Help with closing a UserForm | Excel Programming |