You can add any number of Application.OnTime commands. The only catch is
that VBA by nature is not multithreaded. You will not be able to run two
routines at the same time. So for example if a macro routine takes 5 seconds
to complete, and you have already scheduled to run it immediately with a
second routine, it would only run after the first routine is complete. Hope
that answers your question. If not, post back.

Regards,

Sam Mathai Chacko (GL)

On Wed, Oct 19, 2011 at 2:10 AM, JenIT <jen...@alliedstaffing.com> wrote:

> I have one macr workbook that has several macros.  I didn't know if
> there is a way to have more than one Macro be scheduled to run at a
> certain when the Macro workbook is opened.  I currently have Task
> Scheduler running to open the workbook and then it runs my macro at a
> certain time.
>
> Here is the code that I currently have for my macro but I would like
> to have the ability to schedule another one to run.
>
> Private Sub Workbook_Open()
>    If Int(Range("LastRun")) < Date Then
>        Application.OnTime Date + TimeValue("15:33:00"),
> "Vertis_On_Premise_Report"
>    End If
> End Sub
>
> Sub Vertis_On_Premise_Report()
>
>
>   Range("LastRun").Value = Date
>
> 'then the rest of my code
>
> --
>
> ----------------------------------------------------------------------------------
> Some important links for excel users:
> 1. Follow us on TWITTER for tips tricks and links :
> http://twitter.com/exceldailytip
> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
> 3. Excel tutorials at http://www.excel-macros.blogspot.com
> 4. Learn VBA Macros at http://www.quickvba.blogspot.com
> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>
> To post to this group, send email to excel-macros@googlegroups.com
>
> <><><><><><><><><><><><><><><><><><><><><><>
> Like our page on facebook , Just follow below link
> http://www.facebook.com/discussexcel
>



-- 
Sam Mathai Chacko

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

Reply via email to