View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Michel Pierron Michel Pierron is offline
external usenet poster
 
Posts: 214
Default Macro virus prompt

Hi Michael,
You can use vbscript:
To start by writing with NotePad a small script such as:

' Here, the full path name of the workbook to open
Const xlName = "C:\yyy\xxx.xls"
Dim xl, Wbk
Set xl = WScript.CreateObject("Excel.Application")
Set Wbk = xl.Workbooks.Open(xlName)
' Here, the workbook macro name to execute (in a standard module)
xl.Run "MyMacro"
Wbk.Close True
xl.Quit
Set xl = Nothing

save this file in the same directory "G:\Mike\" with the .vbs extension (for
example: xxx.vbs).

In the task scheduler, put in the "run" box:
"C:\yyy\xxx.vbs"

Regards,
MP

"Michael" a écrit dans le message de
...
I want to run a macro daily from a windows Scheduled Task
which works fine, however when the file opens I get the
warning message asking if I want to enable Macro's. I
read somewhere that you can digitally sign the macro and
the message box will not appear, how do I do this.

Thanks in advance
Michael