+ Reply to Thread
Results 1 to 2 of 2

Automation

  1. #1
    Chris
    Guest

    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 bit)@aol.com

  2. #2
    Guest

    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 bit)@aol.com
    >.
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1