Home |
Search |
Today's Posts |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro / function text time to 24hr excel time passed midnight fortotaling hr's | Excel Worksheet Functions | |||
Macro elapsed time bar (same as download time elapsed bar) | Excel Programming | |||
time and auto macro run by setting time | Excel Programming | |||
Help with Macro to Convert Date/Time to Time Only | Excel Programming | |||
excel - macro - automatic initiation of a macro at a pre-specified "system time" | Excel Programming |