Using "Userform", I have created a display called "Patience". It has a picture and a few words about a macro running. I have the timer set for 10 seconds which is about the time the macros take to run. In order to display the complete userform (picture and all), I had to set the "ShowModal" to "True", otherwise it displayed a blank userform. The timer works well with the ShowModal set to "False", but with "ShowModal" set to "True" it won't start unless I click on "label1" (within the userform). Sometimes it will also just keep running so I have to stop it by pressing "esc", the debug then highlights "Wend" as my error.
With the "ShowModal" set to "False", I can press the macros for "Show", the userform appears in all it's glory, and I can press the macro button for "ShowEnd" and it disappears. All well and good. However, with the "ShowModay" set to "True", the macro button "ShowEnd" just beeps and will not work. I have to click on the label1 within the userform for it to away.
*****
Sub Ten_Seconds()
Patience.Show
S = Second(Time()) + 10
While Second(Time()) < S
Range("B7").Value = Time()
Wend
Patience.Hide
End Sub
******
Sub ShowEnd()
Patience.Hide
End Sub
********
Sub Show()
Patience.Show
End Sub
********
1) Is there a command I should use to end the timer other than "Wend"?
2) What do I need to start the timer automatically when the "ShowModal" is set to "True"?
3) With "ShowModal" set to "True", what do I need to do to activate the macro button for "ShowEnd" so I can hide the Userform "Patience"? These are strictly for additional "play" and test and will not be activated while the "Ten_Seconds" macro is running.
4) I have tried using "ShowEnd" and "Show" in the "Ten_Seconds" macro in lieu of "Patience.Show" and "Patience.Hide", but they don't seem to work. Should they? Have also tried "Call Show"
This is a very simple timer, shows the actual time, etc., in "B7" right now. Just need a little "fixin".
Thanks in advance.
Dick
With the "ShowModal" set to "False", I can press the macros for "Show", the userform appears in all it's glory, and I can press the macro button for "ShowEnd" and it disappears. All well and good. However, with the "ShowModay" set to "True", the macro button "ShowEnd" just beeps and will not work. I have to click on the label1 within the userform for it to away.
*****
Sub Ten_Seconds()
Patience.Show
S = Second(Time()) + 10
While Second(Time()) < S
Range("B7").Value = Time()
Wend
Patience.Hide
End Sub
******
Sub ShowEnd()
Patience.Hide
End Sub
********
Sub Show()
Patience.Show
End Sub
********
1) Is there a command I should use to end the timer other than "Wend"?
2) What do I need to start the timer automatically when the "ShowModal" is set to "True"?
3) With "ShowModal" set to "True", what do I need to do to activate the macro button for "ShowEnd" so I can hide the Userform "Patience"? These are strictly for additional "play" and test and will not be activated while the "Ten_Seconds" macro is running.
4) I have tried using "ShowEnd" and "Show" in the "Ten_Seconds" macro in lieu of "Patience.Show" and "Patience.Hide", but they don't seem to work. Should they? Have also tried "Call Show"
This is a very simple timer, shows the actual time, etc., in "B7" right now. Just need a little "fixin".
Thanks in advance.
Dick