Enter this code in thisworkbook module
Rich (BB code):Private Sub Workbook_Open() Application.OnTime TimeValue("13:30:00"), "MyMacro" 'here mymacro stands for macro name you want to run when the time comes End Sub
Sub Auto_Open() 'runs whenever workbook is opened
Range("A2").Select
ActiveCell.Value = "=now()"
If ActiveCell.Value > Range("A1").Value Then
Application.Run "ExcelFileName!MyMacro"
End If
End Sub
[/FONT]
[FONT=Courier New]Private Sub Workbook_Open()[/FONT]
[FONT=Courier New]Application.OnTime TimeValue("13:30:00"), "MyMacro"[/FONT]
[FONT=Courier New]'here mymacro stands for macro name you want to run when the time comes[/FONT]
[FONT=Courier New]End Sub[/FONT]
[FONT=Courier New][/FONT]
[FONT=Courier New][/FONT]
[FONT=Courier New]sub MyMacro()[/FONT]
[FONT=Courier New][/FONT]
[FONT=Courier New] if date <> "1/30/2011" then exit sub[/FONT]
[FONT=Courier New]'what you want goes here..[/FONT]
[FONT=Courier New]end sub[/FONT]
I thought you can handle from there sorry...
then something like this...
Code:[/FONT] [FONT=Courier New]Private Sub Workbook_Open()[/FONT] [FONT=Courier New]Application.OnTime TimeValue("13:30:00"), "MyMacro"[/FONT] [FONT=Courier New]'here mymacro stands for macro name you want to run when the time comes[/FONT] [FONT=Courier New]End Sub[/FONT] [FONT=Courier New]sub MyMacro()[/FONT] [FONT=Courier New]if date <> "1/30/2011" then exit sub[/FONT] [FONT=Courier New]'what you want goes here..[/FONT] [FONT=Courier New]end sub[/FONT][/QUOTE]