#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 788
Default Automation

Does anyone know whether it is possible to code a spreadsheet to perform a
task at a particular time, eg 7am on a Monday? if so does the spreadsheet
have to be open?

Please reply to: cjneth(remove this
  #2   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Automation

hi,
Read up on the ontime event in help. there are 2.
yes the spread sheet has to be open.
I use the ontime event to run a series of macros each
morning at 5:00am. i use the other ontime event to skip
weekends.
my code.
Sub macALaunchMR()

If Weekday(Now()) = 6 Then '1 = Sunday, 2 = Monday, 3
= Tuesday, ect
'ActiveCell.FormulaR1C1 = "This macro will not start
until 5:00am " & Date + 2.5

Application.OnTime Now() + 2.5 + TimeValue
("00:00:03"), "macAStart"
Else
Application.OnTime TimeValue
("05:00:00"), "macAStart"
End If

End Sub
caution: this wrapped big time.
good luck

-----Original Message-----
Does anyone know whether it is possible to code a

spreadsheet to perform a
task at a particular time, eg 7am on a Monday? if so

does the spreadsheet
have to be open?

Please reply to: cjneth(remove this
.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automation from VB6 Robert A. Boudra Excel Programming 2 November 16th 04 11:20 PM
MFC Automation Macca Excel Programming 0 September 28th 04 02:52 PM
automation agent orange Excel Programming 2 April 12th 04 01:45 PM
OLE Automation Bob C. Excel Programming 1 December 9th 03 12:37 AM
Automation Frank[_18_] Excel Programming 3 October 29th 03 02:18 AM


All times are GMT +1. The time now is 07:15 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"