I have a macro which waits for a minute and then runs again. The wait is done using this code:
Dim dtNextRunAt As Date
Dim strStopTimer As String
dtNextRunAt = Now() + TimeSerial(0, 1, 0)
Do While dtNextRunAt > Now()
'do something
Loop
While the do loop is running the user just sees an hourglass and cannot click in the worksheet, minimize or even close excel.
How can I run the macro and still allow the users to minimize excel or click a button to stop the macro?
Thanks
Dim dtNextRunAt As Date
Dim strStopTimer As String
dtNextRunAt = Now() + TimeSerial(0, 1, 0)
Do While dtNextRunAt > Now()
'do something
Loop
While the do loop is running the user just sees an hourglass and cannot click in the worksheet, minimize or even close excel.
How can I run the macro and still allow the users to minimize excel or click a button to stop the macro?
Thanks