ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to enable macros automatic? (https://www.excelbanter.com/excel-programming/394027-how-enable-macros-automatic.html)

Mariam Mata

How to enable macros automatic?
 

I need to enable macros on open event...

Sugggestions,
Thnaks a lot !

*** Sent via Developersdex http://www.developersdex.com ***

Jim Thomlinson

How to enable macros automatic?
 
You can't. Enabling macros is a security feature to prevent viruses. It would
not be too useful if a virus could just enable macros.

What you can do it look at digital signatures or setting up a system to make
the spreadsheet indicate that Macros are not enabled. Basically have a sheet
that gets hidden by a macro. If macros are not disabled then the sheet does
not get hidden and the end user is notified of the need to enable macros...
--
HTH...

Jim Thomlinson


"Mariam Mata" wrote:


I need to enable macros on open event...

Sugggestions,
Thnaks a lot !

*** Sent via Developersdex http://www.developersdex.com ***


Gord Dibben

How to enable macros automatic?
 
Macros must be enabled before the open event can take place.

Otherwise there would be no need for macro security settings.

Maybe re-think your project needs?


Gord Dibben MS Excel MVP

On Tue, 24 Jul 2007 08:14:26 -0700, Mariam Mata wrote:


I need to enable macros on open event...

Sugggestions,
Thnaks a lot !

*** Sent via Developersdex http://www.developersdex.com ***



Mark Ivey

How to enable macros automatic?
 
One idea...

You could run a VBScript before opening the Excel file to set the macro
security to medium or even low. Here is a script that will change the macro
security level to low for Excel XP. The path may change a bit for different
versions of Excel.


Option Explicit
Dim objShell, RegLocate
Set objShell = WScript.CreateObject("WScript.Shell")
On Error Resume Next
RegLocate =
"HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\ Excel\Security\Level"
objShell.RegWrite RegLocate,"1","REG_DWORD"
WScript.Quit




"Mariam Mata" wrote in message
...

I need to enable macros on open event...

Sugggestions,
Thnaks a lot !

*** Sent via Developersdex http://www.developersdex.com ***




Chip Pearson

How to enable macros automatic?
 
You can't force macros to be enabled. That would invalidate the entire
purpose of disabling them. One option is to make your workbook unusable if
macros are disabled. See http://www.cpearson.com/excel/EnableMacros.aspx .


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting
www.cpearson.com
(email on the web site)


"Mariam Mata" wrote in message
...

I need to enable macros on open event...

Sugggestions,
Thnaks a lot !

*** Sent via Developersdex http://www.developersdex.com ***




All times are GMT +1. The time now is 07:17 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com