Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default enabling macros from command line

I need to automate some Excel processing via macros so that a job can
just be scheduled to run without any user involvement. For this to
work, macros have to be enabled. Unfortunately, I know of only one
way to do this that doesn't involve interaction from the user -
setting the security level to low.

Is there any other way around this? Ideally, there would be a command
line option that would enable macros but I haven't found anything.
Setting the security level to low will obviously work but it's not a
good solution. Any other possibility?

Denis
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default enabling macros from command line

Write a VBS (or other) script that creates an instance of Excel that then
opens your workbook. Macros in it will be enabled regardless of the user's
security settings. You can have your code called from the Workbook Open
event in the workbook or you can use RUN to execute the code.
--
Jim
"Denis" wrote in message
...
|I need to automate some Excel processing via macros so that a job can
| just be scheduled to run without any user involvement. For this to
| work, macros have to be enabled. Unfortunately, I know of only one
| way to do this that doesn't involve interaction from the user -
| setting the security level to low.
|
| Is there any other way around this? Ideally, there would be a command
| line option that would enable macros but I haven't found anything.
| Setting the security level to low will obviously work but it's not a
| good solution. Any other possibility?
|
| Denis

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default enabling macros from command line

Hi Jim

Do I remind this correct ?

As far as I know you must enable the first VBS script you run on your computer one time (a msgbox I believe).


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Jim Rech" wrote in message ...
Write a VBS (or other) script that creates an instance of Excel that then
opens your workbook. Macros in it will be enabled regardless of the user's
security settings. You can have your code called from the Workbook Open
event in the workbook or you can use RUN to execute the code.
--
Jim
"Denis" wrote in message
...
|I need to automate some Excel processing via macros so that a job can
| just be scheduled to run without any user involvement. For this to
| work, macros have to be enabled. Unfortunately, I know of only one
| way to do this that doesn't involve interaction from the user -
| setting the security level to low.
|
| Is there any other way around this? Ideally, there would be a command
| line option that would enable macros but I haven't found anything.
| Setting the security level to low will obviously work but it's not a
| good solution. Any other possibility?
|
| Denis

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default enabling macros from command line

On Nov 5, 11:58 am, "Jim Rech" wrote:
Write a VBS (or other) script that creates an instance of Excel that then
opens your workbook. Macros in it will be enabled regardless of the user's
security settings. You can have your code called from the Workbook Open
event in the workbook or you can use RUN to execute the code.
--
Jim"Denis" wrote in message


Great. I just did a little test case opening a .xls with a
Workbook_Open macro and it worked as advertised. Thanks a bunch.

Denis
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
Enabling Macros Nikhil Excel Worksheet Functions 1 July 9th 08 12:47 PM
Running Macros from Command line DrukeEr Excel Programming 3 July 26th 05 06:03 PM
macros from command line Cyberwolf Excel Discussion (Misc queries) 3 July 19th 05 05:35 PM
Enabling macros Pennington Excel Worksheet Functions 1 December 2nd 04 07:43 PM
command line excel to run macros Anthony Ryan Excel Programming 0 August 10th 03 02:06 PM


All times are GMT +1. The time now is 06:17 AM.

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"