Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Disable Macros when loading a Workbook in Excel 2000

Hey
Is there a way to switch off macros when you open a workbook with Excel
2000 via Automation?
I know there is the
excelApp.AutomationSecurity =
soAutomationSecurity.msoAutomationSecurityForceDis able;
in Excel 2003, but that is not around for 2000 yet.
Also, setting
EnableEvents = false
is not working either. Seems to be a bug according to MS.

Thanks

Remy Blaettler
www.collaboral.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Disable Macros when loading a Workbook in Excel 2000

Can you open the workbooks after you disable events:

dim wkbk as workbook
application.enableevents = false
set wkbk = workbooks.open(...)
application.enableevents = true

And if you do anything to the workbook, turn off events before you do it.

Wouldn't that be the equivalent of disabling macros???



Remy wrote:

Hey
Is there a way to switch off macros when you open a workbook with Excel
2000 via Automation?
I know there is the
excelApp.AutomationSecurity =
soAutomationSecurity.msoAutomationSecurityForceDis able;
in Excel 2003, but that is not around for 2000 yet.
Also, setting
EnableEvents = false
is not working either. Seems to be a bug according to MS.

Thanks

Remy Blaettler
www.collaboral.com


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Disable Macros when loading a Workbook in Excel 2000

Dave, I think he has tried that and is making reference to this article:

http://support.microsoft.com/default...b;en-us;211626
XL2000: EnableEvents Property Does Not Work in Automation Server

So the solution for that case is a macro run from within Excel that disables
events. How that is implemented by the OP is their decision.

--
Regards,
Tom Ogilvy



"Dave Peterson" wrote in message
...
Can you open the workbooks after you disable events:

dim wkbk as workbook
application.enableevents = false
set wkbk = workbooks.open(...)
application.enableevents = true

And if you do anything to the workbook, turn off events before you do it.

Wouldn't that be the equivalent of disabling macros???



Remy wrote:

Hey
Is there a way to switch off macros when you open a workbook with Excel
2000 via Automation?
I know there is the
excelApp.AutomationSecurity =
soAutomationSecurity.msoAutomationSecurityForceDis able;
in Excel 2003, but that is not around for 2000 yet.
Also, setting
EnableEvents = false
is not working either. Seems to be a bug according to MS.

Thanks

Remy Blaettler
www.collaboral.com


--

Dave Peterson



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Disable Macros when loading a Workbook in Excel 2000

I remember skimming by that thread. Thanks for the solution (I'll speak for the
OP!).

Tom Ogilvy wrote:

Dave, I think he has tried that and is making reference to this article:

http://support.microsoft.com/default...b;en-us;211626
XL2000: EnableEvents Property Does Not Work in Automation Server

So the solution for that case is a macro run from within Excel that disables
events. How that is implemented by the OP is their decision.

--
Regards,
Tom Ogilvy

"Dave Peterson" wrote in message
...
Can you open the workbooks after you disable events:

dim wkbk as workbook
application.enableevents = false
set wkbk = workbooks.open(...)
application.enableevents = true

And if you do anything to the workbook, turn off events before you do it.

Wouldn't that be the equivalent of disabling macros???



Remy wrote:

Hey
Is there a way to switch off macros when you open a workbook with Excel
2000 via Automation?
I know there is the
excelApp.AutomationSecurity =
soAutomationSecurity.msoAutomationSecurityForceDis able;
in Excel 2003, but that is not around for 2000 yet.
Also, setting
EnableEvents = false
is not working either. Seems to be a bug according to MS.

Thanks

Remy Blaettler
www.collaboral.com


--

Dave Peterson


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Disable Macros when loading a Workbook in Excel 2000

The problem is that the macro is executed in the Open event in Excel,
so until I can call a macro to switch of Macros, it's already too late.

Remy

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 do I disable the automatic virus scan when loading Excel 2007 hgreeb Setting up and Configuration of Excel 1 May 10th 09 12:50 PM
Disable VBA code execution when loading a workbook Charles Excel Discussion (Misc queries) 4 October 14th 05 09:12 PM
Disable Macros in workbook programmatically quartz[_2_] Excel Programming 2 April 2nd 05 03:31 AM
Disable or remove macros for a workbook to be sent in email... [email protected] Excel Programming 3 January 13th 05 03:31 PM
Disable Macros when opening workbook Rob[_21_] Excel Programming 7 November 12th 04 09:22 AM


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