ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Call Macro (https://www.excelbanter.com/excel-discussion-misc-queries/256928-call-macro.html)

jswalsh33

Call Macro
 
Can I call a Macro to run from a scheduled Task. If yes, How.

Thanks for your help.

Jim Walsh

Mike H

Call Macro
 
Hi,

You could do this. Create a task that opens a workbook at the required time
and in that workbook utilise the Open event to call your macro

Private Sub Workbook_Open()
Call MyMacro
End Sub

Sub MyMacro()
'Do things
End Sub

--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"jswalsh33" wrote:

Can I call a Macro to run from a scheduled Task. If yes, How.

Thanks for your help.

Jim Walsh


Mike H

Call Macro
 
Hi,

Forgot to mention you can also use the ONTIME method to run a macro at a
given time.

Have a look here

http://www.ozgrid.com/Excel/run-macro-on-time.htm
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"jswalsh33" wrote:

Can I call a Macro to run from a scheduled Task. If yes, How.

Thanks for your help.

Jim Walsh



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

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