View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Lost and Looking for Help Lost and Looking for Help is offline
external usenet poster
 
Posts: 15
Default Scheduling a Macro to Run

I would like to schedule the event to run at about 4:00 am. How can i have
it set up to run automatically if the time is between 4am and 5 am and run
manually if it is any other time? I just made up this code but it obviously
doesn't work

Sub Workbook_Open()
If Time 3 and Time < 5 Then Call CommandButton1_Click
Else
End Sub


CommandButton1_Click is the Sub that runs the program

"Ikaabod" wrote:


You can have windows open the excel file and have a macro in that excel
file that executes upon openning:

Private Sub Workbook_Open()

End Sub

Lost and Looking for Help Wrote:
I know that i can set up Windows to run Excel at a certain time everyday
or
week or what ever. I am wondering if there is a way to schedule excel
to
open a file and execute a macro at a certain time each week.

Thanks,

Tim



--
Ikaabod
------------------------------------------------------------------------
Ikaabod's Profile: http://www.excelforum.com/member.php...o&userid=33371
View this thread: http://www.excelforum.com/showthread...hreadid=542515