Windows Scheduled Tasks

M

MarkS

HI,
I would like to use Windows Scheduled Tasks to start excel and run a macro
in that spread sheet. This gives rise to two questions
1. Can I do this.
2. How do I do it/ find information on it

Thanks MarkS.
 
M

Mike H

Hi,

You can do that fairly easily but it does require a few steps:-

1. Prepare you workbook and one way to run the macro automatically is to put
it in the workbook open event like this:-

Private Sub Workbook_Open()
MsgBox "Hello"
End Sub

2. You must now digitally sign the workbook so you don't get the 'Enable
Macros' warning when it opens so in Windows:-

Go to Start>Programs>Microsoft Office>Office Tools and build a cert from
there, it's very simple and intuative.

Once created, open your workbook and go to the VBE and
Tools>Digital Signature>Choose.

Pick the one you just created and OK then Save.
Close workbook and open it again.

Check "always trust this publisher" and enable macros.

Now the last bit and once again in Windows
Start|Settings|Control Panel and select schedule tasks
Once again this is very intuative but the thing to remember on the first
step is brows to you excel workbook and not simply open Excel.

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top