Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default Disable AutoOpen macro's

Hi All,

I have a macro that l run from a workbook which requires a second workbook
to be opened.

The second workbook contains a AutoOpen macro, the code of which is in the
ThisWorbook object. The AutoOpen macro prompts the user for Yes/No answers
upon opening via message boxes.

I would like to disable the AutoOpen macro on the second workbook when it is
opened via the VBA code in the 1st workbook.

The code l have used is

Workbooks.Open ("BLB0000")

The online help states that the above code will NOT initiate the AutoOpen
macro but that does not seem to be the case !

I am developing the code in Excel 2000 but it will be also need to be used
on Excel 97.

Any help greatly appreciated.

Michael Beckinsale.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 176
Default Disable AutoOpen macro's

Michael,

Use:

Application.EnableEvents = False
Workbooks.Open FileName:="BLB0000"
Application.EnableEvents = True

HTH,
Bernie


"Michael Beckinsale" wrote in
message ...
Hi All,

I have a macro that l run from a workbook which requires a second

workbook
to be opened.

The second workbook contains a AutoOpen macro, the code of which is

in the
ThisWorbook object. The AutoOpen macro prompts the user for Yes/No

answers
upon opening via message boxes.

I would like to disable the AutoOpen macro on the second workbook

when it is
opened via the VBA code in the 1st workbook.

The code l have used is

Workbooks.Open ("BLB0000")

The online help states that the above code will NOT initiate the

AutoOpen
macro but that does not seem to be the case !

I am developing the code in Excel 2000 but it will be also need to

be used
on Excel 97.

Any help greatly appreciated.

Michael Beckinsale.




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
Macro's are fun Chris Excel Worksheet Functions 0 February 7th 08 06:09 AM
Automatically disable macro's on new doc Sarah (OGI) Excel Discussion (Misc queries) 12 August 17th 07 02:19 AM
Hide Macro's in Toolbar / Macro's list sparx Excel Discussion (Misc queries) 2 May 6th 06 08:53 PM
enable/disable macro's dialog? Trevor Shuttleworth Excel Programming 0 August 19th 03 10:14 PM


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