Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Macro virus prompt

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 115
Default Macro virus prompt

This won't address the original issue, which was the macro warning dialog.

- Jon

Michel Pierron wrote:

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





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 214
Default Macro virus prompt

Hi Jon,
while thus proceeding, the warning of safety of the macros is by-passed.
MP

"Jon Peltier" a écrit dans le message de
...
This won't address the original issue, which was the macro warning dialog.

- Jon

Michel Pierron wrote:

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







  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 115
Default Macro virus prompt

Michel -

My apologies, I didn't test it first. Indeed, at least in Excel 2002,
the file with the macro opens without a macro warning, and the macro runs.

I'm rather surprised this works, given the attention that macro viruses
have received over the years.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______

Michel Pierron wrote:

Hi Jon,
while thus proceeding, the warning of safety of the macros is by-passed.
MP

"Jon Peltier" a écrit dans le message de
...

This won't address the original issue, which was the macro warning dialog.

- Jon

Michel Pierron wrote:


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








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 214
Default Macro virus prompt

Jon,
Yes, you are right, but if that did not function, Excel would not be a true
ole object.
MP

"Jon Peltier" a écrit dans le message de
...
Michel -

My apologies, I didn't test it first. Indeed, at least in Excel 2002,
the file with the macro opens without a macro warning, and the macro runs.

I'm rather surprised this works, given the attention that macro viruses
have received over the years.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______

Michel Pierron wrote:

Hi Jon,
while thus proceeding, the warning of safety of the macros is by-passed.
MP

"Jon Peltier" a écrit dans le message

de
...

This won't address the original issue, which was the macro warning

dialog.

- Jon

Michel Pierron wrote:


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








Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro virus Morrigan Excel Discussion (Misc queries) 1 August 30th 05 06:11 PM
Macro virus prompt Michael Excel Programming 0 July 8th 04 04:29 PM
Macro virus prompt papou[_9_] Excel Programming 5 July 8th 04 03:52 PM
Macro virus prompt Jan Karel Pieterse Excel Programming 0 July 8th 04 01:00 PM
macro virus Cindy Excel Programming 0 February 18th 04 09:32 PM


All times are GMT +1. The time now is 03:49 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"