Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Open workbook using VBA but don't run macros

What is the line I can use to open a spreadsheet (123.xls say), but not run
the macros that are in the open event of 123.xls

I can open the workbook using
workbooks.open FileName:= "C:\123.xls"
but the macros run.

How do I do this? Is it possible?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Open workbook using VBA but don't run macros

application.enableevents = false
workbooks.open filename:="C:\123.xls"
application.enableevents = true

You may want to do the same thing when you close the workbook.

Paulymon wrote:

What is the line I can use to open a spreadsheet (123.xls say), but not run
the macros that are in the open event of 123.xls

I can open the workbook using
workbooks.open FileName:= "C:\123.xls"
but the macros run.

How do I do this? Is it possible?


--

Dave Peterson
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
Open workbook without running Macros Raul[_2_] Excel Programming 2 May 27th 06 02:51 PM
Turn Off Macros With Workbook Open Paul Moles Excel Programming 8 October 19th 04 08:01 AM
Open workbook-macros enabled, opening another with macros George J Excel Programming 5 September 17th 04 02:07 PM
Open workbook - prevent macros Charles Excel Programming 0 June 23rd 04 08:46 PM
Can't open Excel2003 workbook containing VBA macros with Excel2000. Paul S. Natanson Excel Programming 2 June 18th 04 03:57 PM


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