Running VB script to run from scheduler

jessiegeorgia

Board Regular
Joined
Aug 19, 2011
Messages
78
Hi All,

I'm new to VB so having written something that works (with help from the MrExcel community) I'd like to add it to a scheduler to run on the first of the month.
However, my code only runs when I open the file and run it myself, in order to run from the scheduler I need it to run automatically on opening. Do I change this in the code or is it in the tools or somewhere else???

Many thanks in advance,
Jess
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
On teh desktop scheduler you can set it to run at the beginning of the month, select your desktop, then press F1 then type schedule, once it finds the help topic click the link then in the console select the Help menu and look at Schedule and trigger this is what they say

If you select the Monthly radio button, you choose the months in which you want to start the task and the weeks of the month and the days of the week for each month in which you want to start the task. You can also specify that you want to start a task on the last day of each month.

Then when you test this, the task also needs to run the macro within the workbook.

This link gives you the command line to run a macro

http://support.microsoft.com/kb/213837
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,723
Members
452,939
Latest member
WCrawford

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