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


Hi there

I am using this code it works only when Excel Macros are
enabled.........so what is the point of excuting this code while Excel
macros are enabled.

when excuting this code it askes to open a xl file, so the code opens
the file with macros either enabled or disabled......but this code
works only if Excel Macros are enabled, otherwise this code will not
work.........

The code :

Code:
--------------------
Sub Security()
Dim lngAutomation As MsoAutomationSecurity

With Application
lngAutomation = .AutomationSecurity
'.AutomationSecurity = msoAutomationSecurityForceDisable
.AutomationSecurity = msoAutomationSecurityLow
With .FileDialog(msoFileDialogOpen)
.Show
.Execute
End With
.AutomationSecurity = lngAutomation
End With

End Sub
--------------------


--
helmekki


------------------------------------------------------------------------
helmekki's Profile: http://www.excelforum.com/member.php...fo&userid=6939
View this thread: http://www.excelforum.com/showthread...hreadid=480751

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Code to Enable Macros


Hello Hesham,

As you pointed out, its value in VBA is senseless. However, in other
langauges, like Visual Basic, C++, Java Script, and some others, that
can be compiled, is it very valuable tool.

Sincerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=480751

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 by Code aftamath77 Excel Discussion (Misc queries) 4 October 8th 08 04:49 PM
Enable Macros Ronbo Excel Programming 3 May 24th 04 06:32 AM
Code to ignore on-screen message concerning "Enable Macros." Phil Hageman[_3_] Excel Programming 2 February 26th 04 01:51 PM
Disable/Enable Macros through code ibeetb Excel Programming 3 December 7th 03 05:24 AM
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 12:26 PM.

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

About Us

"It's about Microsoft Excel"