View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Lucy[_2_] Lucy[_2_] is offline
external usenet poster
 
Posts: 7
Default Close Open Woorkbook and Quit Excel

I need to shut down open Excel workbooks at 11 PM to
start data update. These workbooks can be opened on
different PC's and as such, I need to include in these
workbooks code similar to On Timer event in Access. I
have found following OnTime event, but now need a trigger
to start it.

If Format(Now(), "Medium Time") = Format
("23:00:00, "Medium Time") Then
Application.OnTime Now + TimeValue
("00:0:05"), "Quit_Workbook"
End If

Perhaps there is a better way to do this as I am not too
familiar with Excel programming.

Any help or resource is greatly appreciated. Thanks.

Lucy