LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Run Macro at specified time

Thanks Mike H,

For detailed explanation.. I really appreciate your help and looking forward.

Regards, SS

"Mike H" wrote:

Hi,

Alt +f11 to open VB editor. Double click 'This workbook' and past this in

Private Sub Workbook_Open()
Application.OnTime TimeValue("14:30:00"), "MySub"' Change to your sub name
End Sub

Now right click 'This Workbook' and 'Insert Module' and paste your sub in.
Note that the first 2 lines of your sub must be
Application.OnTime
TimeValue ("14:30:00"), "MySub" 'Change to your sub name


Sub MySub() 'Change to your sub name
Application.OnTime
TimeValue ("14:30:00"), "MySub" 'Change to your sub name
'Your code
End Sub


Mike

"SANDIND" wrote:

Hi Mike H

Thanks a Lot !!

I am sorry I am knew to VB , Can you please tell me what do you mean by
Standard module, do I need to copy that in a new module.

And also can you please let me know that here :
TimeValue ("14:30:00"), "MyMacro"

In place of my macro, do I only need to type name of macro which I want to
run or the full code.

Thanks a lot for all your help.

SS

"Mike H" wrote:

Hi,

This workbook open module

Private Sub Workbook_Open()
Application.OnTime TimeValue("14:30:00"), "MySub"
End Sub

and this in a standard module

Sub MySub()
Application.OnTime
TimeValue ("14:30:00"), "MyMacro"
'Do lots of things
End Sub

1. The workbook must be open for this to work so you can leave it open or
open it with Windows task scheduler.

2. AFAIK there are no issues with this on a shared drive.

Mike


"SANDIND" wrote:

Hi

I want to run a macro at specified time suppose 2.30 pm.

I have two clarrification(featues) regarding this : (1) Can this timed macro
run even if the workbook is closed (2) Workbook is placed in share drive.

If someone can help me with the macro having both the features then I would
really apprecite his efforts.

Thanks, SS

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro / function text time to 24hr excel time passed midnight fortotaling hr's Russmaz Excel Worksheet Functions 2 March 6th 09 04:58 AM
Macro elapsed time bar (same as download time elapsed bar) klysell Excel Programming 2 April 26th 07 04:58 PM
time and auto macro run by setting time ddiicc Excel Programming 1 September 29th 05 05:32 AM
Help with Macro to Convert Date/Time to Time Only Bill[_26_] Excel Programming 5 August 25th 04 01:50 PM
excel - macro - automatic initiation of a macro at a pre-specified "system time" arunjoshi[_3_] Excel Programming 3 May 1st 04 09:42 AM


All times are GMT +1. The time now is 05:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"