Results 1 to 6 of 6

hi i have formula it's working fine but i want to Automatically run macros at Specified.

Threaded View

  1. #1
    Registered User
    Join Date
    10-01-2012
    Location
    kolkatta
    MS-Off Ver
    Excel 2003
    Posts
    7

    hi i have formula it's working fine but i want to Automatically run macros at Specified.

    hi
    i have formula it's working fine but i want to Automatically run macros at Specified. how to add in this formula specified time also.

    Dim TimeToRun
    
    Sub Run()
        Call Scheduler
    End Sub
    
    Sub Scheduler()
        TimeToRun = Now + TimeValue("00:00:01")
        Application.OnTime TimeToRun, "Copier"
    End Sub
    
    Sub Copier()
       
          Sheets("Sheet1").Range("a1").Copy Destination:=Sheets("Sheet2").Range("A" & Rows.Count).End(xlUp).Offset(1)
    Sheets("Sheet2").Range("B" & Rows.Count).End(xlUp).Offset(1).Value = Now
    
      
        Call Scheduler
    End Sub
    
    Sub Resumer()
        On Error Resume Next
        Application.OnTime TimeToRun, "Copier", , False
    End Sub


    MODERATOR'S NOTE:

    Vikas, you managed to break two rules with one post! Oh my.

    I've moved your post to a thread of it's own as per rule #2
    I've added code tags to your post as per rule #3

    Please take a moment to read the Forum Rules (link is above in the menu bar). Thank you.
    Last edited by JBeaucaire; 10-07-2012 at 09:54 AM.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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