Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to enable macros automatic?


I need to enable macros on open event...

Sugggestions,
Thnaks a lot !

*** Sent via Developersdex http://www.developersdex.com ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default 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 ***

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default 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 ***


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 120
Default 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 ***



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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 ***


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
How to enable macros and automatic calculation on Excel Viewer? David Excel Worksheet Functions 2 April 5th 07 08:53 PM
choose default macros Not Enabled / Macros Enable Setting BEEJAY Excel Programming 2 June 30th 06 01:07 PM
VBA select default Don't Enable / Enable macros Setting BEEJAY Excel Programming 1 June 29th 06 08:45 PM
'Enable Automatic Refresh?' Nigel Brown Setting up and Configuration of Excel 0 June 27th 06 05:22 PM
Suppress the Disable Macros / Enable Macros Dialog Shoji Karai Excel Programming 5 September 24th 03 03:10 AM


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