Scorpion Steve
Board Regular
- Joined
- Jun 5, 2011
- Messages
- 220
Hey, I've managed to figured out the layout of my project but need the below function/code to repeat/loop itself.
Can anyone help before I overdose on headache tablets please?
The code says: Once opened, run macro after 10mins
I would like it to say:
Once opened, run macro after ten mins, then count run macro after tens mins, then run macro after ten mins etc etc.
I need this to run every 20 mins from 6am to 5pm once opened.
(the actual time is not important, just the time scale! I.e 11hrs
Thanks
View code:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.OnTime dTime, "RUN_SAVE", , False
End Sub
Private Sub Workbook_Open()
Application.OnTime Now + TimeValue("00:00:15"), "RUN_SAVE"
End Sub
Can anyone help before I overdose on headache tablets please?
The code says: Once opened, run macro after 10mins
I would like it to say:
Once opened, run macro after ten mins, then count run macro after tens mins, then run macro after ten mins etc etc.
I need this to run every 20 mins from 6am to 5pm once opened.
(the actual time is not important, just the time scale! I.e 11hrs
Thanks
View code:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.OnTime dTime, "RUN_SAVE", , False
End Sub
Private Sub Workbook_Open()
Application.OnTime Now + TimeValue("00:00:15"), "RUN_SAVE"
End Sub