Macro should run on a specifi time.

H

Heera

Hi,

I have a workbook and i want to write a code which should run on a
specific time(3.00 PM) everyday at and complete a task.

Regards

Heera
 
M

Mike H

Hi,

Paste in this module

Private Sub Workbook_Open()
Application.OnTime TimeValue("15:00:00"), "MyMacro"
End Sub

Change MyMacro to the name of your code and include the 2 lines below at the
start of your code. Of couse this only works if the workbook is open


Application.OnTime
TimeValue ("15:00:00"), "MyMacro" ' change to your subs name

Mike
 
S

Susan

another way would be to have the workbook open automatically at a
certain time using the windows task manager. then have the macro you
want to run in the workbook_open module. of course, this assumes that
macros are enabled & the workbook can open and run unimpeded.
otherwise it will require the participation of the user to enable the
macros.
just an idea
:)
susan
 

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