Execute macro periodically
Execute macro periodically
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: Execute macro periodically

  1. #1
    New Member
    Join Date
    Feb 2002
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    Please help!
    I need to accomplish a task, which executes an excel macro automatically every month. Any advice on how to do it? Sample code would be very helpful. Thanks.

  2. #2
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Sunny, spring-like Hull
    Posts
    3,339
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    You could try this code which would run your macro if the workbook is opened on the first of a month (adapt it to your own needs): -

    Private Sub Workbook_Open()

    If Day(Now) = 1 Then Call YourMacro

    End Sub

    To enter it, go into the VB editor, click on the 'Workbook' entry in the Project Explorer in the left pane and paste in the above.

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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

 

 
DMCA.com