Dal1981
12-05-2011, 04:49 AM
Hi all, please help!
I have a userform ("UF_Splash") that is driving me mad. :banghead:
It's a splash screen userform of just the company logo, I want this on openeing the workbook up. So, on workbook Open I have just "Load UF_Splash" which triggers the following:
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Sub UserForm_Initialize()
UF_Splash.Show
Do Until i = 5
i = i + 1
Range("A1") = i
Sleep 1000
Loop
UF_Splash.Hide 'I put this in just on testing to see if its working = or where its stopping
Unload UF_Splash
Load UF_Main 'This triggers the next step / userform to open under its own initialize - but I've removed this in testing just till I (Ed. you!!) solve the above
End Sub
----------------
The form loads, then stays open. Thats the issue. 'Sleep' isn't working and I have to queryclose the userform, which when i do, it reopens automatically?! I figure there must be something obvious im overlooking ...please advise. Many thanks!
I have a userform ("UF_Splash") that is driving me mad. :banghead:
It's a splash screen userform of just the company logo, I want this on openeing the workbook up. So, on workbook Open I have just "Load UF_Splash" which triggers the following:
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Sub UserForm_Initialize()
UF_Splash.Show
Do Until i = 5
i = i + 1
Range("A1") = i
Sleep 1000
Loop
UF_Splash.Hide 'I put this in just on testing to see if its working = or where its stopping
Unload UF_Splash
Load UF_Main 'This triggers the next step / userform to open under its own initialize - but I've removed this in testing just till I (Ed. you!!) solve the above
End Sub
----------------
The form loads, then stays open. Thats the issue. 'Sleep' isn't working and I have to queryclose the userform, which when i do, it reopens automatically?! I figure there must be something obvious im overlooking ...please advise. Many thanks!