Scheduling a Macro

A

Ashlyn R.

i have set up a macro using the Application OnTime function. I have used it
on several excel files and two of them work and two of them don't even though
the code is the same. Any ideas why this is happening?

I need the macro to run after it is opened, but not run on every opening, so
I have tried to schedule it to run at a certain time.

Private Sub Worksbooks_Open()

Application.OnTime TimeValue("6:45:00"), "Compliance"

End Sub

(In ThisWorkbook Code)
 
A

Ayo

Check the posting on 4/20/2009 titled Time Macros on Weekday only. I think
the information you are looking for is in one of the replies. And there are a
few websites in there also that would be very helpful.
Good luck
 
A

Ashlyn R.

I don't need it scheduled to run on a certain day. I have the file opening
(using Scheduled Tasks) on the days that I need it. I would like to know why
the macro works on some files, but not on the others.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top