Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Jan 2002
    Location
    Trenton, Ontario
    Posts
    175
    Thanks
    0
    Thanked 0 Times in 0 Posts

    On_Time Macro (2000)

    Good Afternoon,
    I have a workbook that runs a query as soon as it opens, saves itself and then emails it as an attachment to the appropriate people. What I would like to do is have it open by itself at say 2:00am every Friday. I know I can use use a macro in the Personal workbook to get it to open at 2:00am using On_Time but how do I get it to run only on Fridays?

    I appreciate any help you can give.
    Stats

  2. #2
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Vienna, Wien, Austria
    Posts
    5,009
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: On_Time Macro (2000)

    Try using the Task Scheduler in Windows Control Panel - setting the Schedule for the workbook; rather than for Excel itself. If you start by setting it up with the Add Scheduled Task wizard, you will need to edit the Task once you've set it up. Change the Task from running Excel itself to opening the workbook in question. HTH
    Gre

  3. #3
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: On_Time Macro (2000)

    You could include a test for the weekday in your calling macro in personal.xls.

    If WeekDay(Date) = vbFriday then
    'Call your code here
    End if


    Andrew C

  4. #4
    2 Star Lounger
    Join Date
    Jan 2002
    Location
    Trenton, Ontario
    Posts
    175
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: On_Time Macro (2000)

    Both of these work great, the macro will work best for what I am doing but I never even considered the Task Scheduler idea.
    Thanks for the quick help!!
    Stats

Posting Permissions

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