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.
Bookmarks