Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 30
Default Enable Macros by Code

Is there code I can put in visual basic that will enable all macros when the
workbook opens, so there is no need to click the options for enable macros.

I know how to enable macros in the Trust Center, I would like to enable by
code.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,355
Default Enable Macros by Code

Try putting this BEFORE you open up your macro.

Application.AutomationSecurity = msoAutomationSecurityLow

If you want the user to later be requested to enable macros, change it back
to

Application.AutomationSecurity = msoAutomationSecurityByUI
--
HTH,
Barb Reinhardt

If this post was helpful to you, please click YES below.



"aftamath77" wrote:

Is there code I can put in visual basic that will enable all macros when the
workbook opens, so there is no need to click the options for enable macros.

I know how to enable macros in the Trust Center, I would like to enable by
code.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default Enable Macros by Code

Hi

There is no way to include such code within a workbook to enable the macros
within that same workbook - the enable/disbale macros prompt is for security
purposes, so it wouldn't be much use if you could simply override it.

Richard



"aftamath77" wrote in message
...
Is there code I can put in visual basic that will enable all macros when
the
workbook opens, so there is no need to click the options for enable
macros.

I know how to enable macros in the Trust Center, I would like to enable by
code.


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Enable Macros by Code

Hi,

No, you can't enable macros by code. If security is set to medium or higher
then it's a user choice whether macros are enabled or not.

Mike

"aftamath77" wrote:

Is there code I can put in visual basic that will enable all macros when the
workbook opens, so there is no need to click the options for enable macros.

I know how to enable macros in the Trust Center, I would like to enable by
code.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,358
Default Enable Macros by Code

Create a Digital Signature.
Add Digital Signature to your macros.
Add Digital Signature to 'Trusted Sources' to the user's computers.

--
John C


"aftamath77" wrote:

Is there code I can put in visual basic that will enable all macros when the
workbook opens, so there is no need to click the options for enable macros.

I know how to enable macros in the Trust Center, I would like to enable by
code.

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
Enable Macros ExcelBob Excel Discussion (Misc queries) 2 May 26th 06 02:40 PM
how to enable macros Ollakal Excel Discussion (Misc queries) 1 October 19th 05 05:58 AM
Enable Macros excelnewbie Excel Worksheet Functions 2 September 18th 05 04:17 AM
can not enable macros Tricia Excel Worksheet Functions 2 August 24th 05 11:18 PM
macros enable myfanwy New Users to Excel 2 February 6th 05 10:01 PM


All times are GMT +1. The time now is 01:30 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"