jbrown2424
New Member
- Joined
- Mar 10, 2022
- Messages
- 8
- Office Version
- 365
NEW TO VBA and the forum so thanks in advance...
I have a command button that takes a few minutes to process and while this code runs I would like to have a userform "PleaseWaitTrain" display (with a did you know fact on it) for 10 seconds then disappear and a 2nd userform "PleaseWaitTw" display for 10 seconds.
These 2 userforms both work perfectly when I call them individually, but when I call them from the same Sub the 1st userform operates as desired and then then 2nd displays a blank userform for 10 seconds.
Below is my code...
Public Sub PleaseWaitTrain_userform_initialize()
PleaseWaitTrain.Show vbModeless
Application.WAIT Now + TimeValue("0:00:10")
Unload PleaseWaitTrain
End Sub
Public Sub PleaseWaitTw_userform_initialize()
PleaseWaitTw.Show vbModeless
Application.WAIT Now + TimeValue("0:00:10")
Unload PleaseWaitTw
End Sub
Public Sub call_macro()
Call PleaseWaitTrain_userform_initialize
Call PleaseWaitTw_userform_initialize
End Sub
Any help would be greatly appreciated.
I have a command button that takes a few minutes to process and while this code runs I would like to have a userform "PleaseWaitTrain" display (with a did you know fact on it) for 10 seconds then disappear and a 2nd userform "PleaseWaitTw" display for 10 seconds.
These 2 userforms both work perfectly when I call them individually, but when I call them from the same Sub the 1st userform operates as desired and then then 2nd displays a blank userform for 10 seconds.
Below is my code...
Public Sub PleaseWaitTrain_userform_initialize()
PleaseWaitTrain.Show vbModeless
Application.WAIT Now + TimeValue("0:00:10")
Unload PleaseWaitTrain
End Sub
Public Sub PleaseWaitTw_userform_initialize()
PleaseWaitTw.Show vbModeless
Application.WAIT Now + TimeValue("0:00:10")
Unload PleaseWaitTw
End Sub
Public Sub call_macro()
Call PleaseWaitTrain_userform_initialize
Call PleaseWaitTw_userform_initialize
End Sub
Any help would be greatly appreciated.