Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 46
Default Stop macro when open excel from VBA

Hello,

I have created a code to open other excel files. However,
in some of the excel files, there are some auto-run macro.
When I open these files via VBA, their auto-run macro will
be executed, which leads to error. If it is possible to
stop these auto-run macro when I open them via VBA. My
excel version is Excel 97 SR-2. The command to open the
file are as following:

Workbooks.Open FileName:="Test.xls",_
updatelinks:=False, _
ReadOnly:=True

Best Regards

Bill

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Stop macro when open excel from VBA

If you turn off events before opening the workbook you should be okay.

Application.EnableEvents = False

And then turn events back on.

--
Jim Rech
Excel MVP


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 stop a toolbar that always turns on when I open Excel? Purge Thunder Setting up and Configuration of Excel 1 September 29th 08 11:53 PM
How to stop message popping up before open the excel? jenhu Excel Discussion (Misc queries) 2 August 3rd 06 02:02 PM
When I open Excel, workbooks open automatically. How can I stop t Rhealbird Excel Discussion (Misc queries) 2 February 23rd 06 10:08 AM
How to stop file open macro prompt after deleting all macros? twor57 Excel Worksheet Functions 2 November 29th 05 05:00 PM
How do I stop Excel from closing the open file each time I open a. Welsin Setting up and Configuration of Excel 3 January 8th 05 11:16 PM


All times are GMT +1. The time now is 10:35 AM.

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"