Hi,
You can use OnTime e.g.
In the workbook code module put this:-
Private Sub Workbook_Open()
'Run YourSub at 6pm
Application.OnTime TimeValue("18:00:00"), "YourSub"
End Sub
Then in a normal module you'd have YourSub...
Sub YourSub()
MsgBox "Hello"
End Sub
Hope this helps,
D
**********************************************
Thanks for the advice. I tried running your small macros, and they seem to work. Only problem is, they aren't time dependant. When I run the macro, it just refers the message box and pops up with the message irregardless of what the time is. Am I doing something wrong?
Ultimately I would like this to occur :
Excel loaded.
at 5pm, a macro is set off by the time, and runs without having to be run manually.
Thanks again for all the help
Igor,
Did you put the Workbook_Open procedure in the Workbook's code module? If so, this will run automatically when you open the workbook. It will set the macro YourSub off at the time specified (in this case 6pm).
You can only run macros at specified times if the workbook containing the macro(s) is open.
If you can't get the example to work, send me an email at the address above.
Regards,
D