Run a macro in excel using Task Scheduler

expert40

Board Regular
Joined
Feb 12, 2012
Messages
71
Hi Team,

We are having macro in excel as below.We want to run a macro in particular time without manual operations.

We have tried using Task Scheduler but finally failed.Can you please guide to complete task.

Excel name:Reminder.xlsm
Macro Name:SendReminderNotices


Public Sub SendReminderNotices()
//code

End Function

Thanks in Advance.
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
These steps are needed:

1. Place a call to the macro in question in the ThisWorkbook Module, inside the Workbook_Open event:

Code:
Private Sub Workbook_Open()
SendReminderNotices
End Sub

2. Make sure there is some code that closes Excel when the macro is done (don't forget to save the file first, otherwise Excel remains open).

3. Make sure the file is saved with macros (xlsm or xlsb filetype).
4. Open the file and enable macros so it is added to your list of trusted files (this has to be done using the same user login as the one which is going to run the scheduler!!!)
5. Now schedule the file to be opened with Excel.
 
Upvote 0

Forum statistics

Threads
1,196,028
Messages
6,012,956
Members
441,740
Latest member
IammeResources

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top