ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro should run on a specifi time. (https://www.excelbanter.com/excel-programming/420040-macro-should-run-specifi-time.html)

Heera

Macro should run on a specifi time.
 
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

Mike H

Macro should run on a specifi time.
 
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
"Heera" wrote:

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


Susan

Macro should run on a specifi time.
 
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



On Nov 14, 12:21*pm, Heera wrote:
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




All times are GMT +1. The time now is 12:24 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com