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: open a workbook with auto macro disabled using code?

I am trying to open a number of workbooks from VBA in excel and I need to
open them with macros disabled or auto macro disabled. This is because the
worksheets I need to open have an auto macro which loads data from a server
and I do not want it to run.
Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default open a workbook with auto macro disabled using code?

Application.EnableEvents = False
workbooks.Open "C:\MyFolder\Myfile.xls"
Application.EnableEvents = True

disables the startup macros.

--
Regards,
Tom Ogilvy

"mike_cutting-edge" wrote in
message ...
I am trying to open a number of workbooks from VBA in excel and I need to
open them with macros disabled or auto macro disabled. This is because the
worksheets I need to open have an auto macro which loads data from a

server
and I do not want it to run.
Thanks.



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 code VBA: Auto open workbook and run macro March Excel Discussion (Misc queries) 4 November 8th 07 08:25 PM
auto run macro on workbook open Mcasteel[_45_] Excel Programming 0 November 15th 04 03:04 PM
auto run macro on workbook open Mcasteel[_43_] Excel Programming 2 November 15th 04 02:57 PM
auto run macro at workbook open Juan Guemes Excel Programming 2 August 28th 04 10:55 PM
Insert VBA code with a macro in a .xls file by workbook open event mihai[_3_] Excel Programming 8 July 29th 04 01:49 PM


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