OFF97: Workbook_Open/Auto_Open Macros Are Run Twice in Binder

ID: Q184282

The information in this article applies to:

SYMPTOMS

In Microsoft Binder, if you insert a Microsoft Excel workbook into a binder file by clicking Add From File on the Section menu, a macro in the workbook may be run twice.

CAUSE

This problem occurs when you first insert a workbook that contains a Workbook_Open or Auto_Open macro. Workbook_Open and Auto_Open macros are run automatically when you open a workbook.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed above.

MORE INFORMATION

Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft Support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact the Microsoft fee-based consulting line at (800) 936-5200. For more information about the support options available from Microsoft, please see the following page on the World Wide Web:

   http://www.microsoft.com/supportnet/refguide/ 

In Microsoft Excel 97, there are two methods that you can use to run a macro automatically when you open a workbook. These methods are as follows: When you insert a workbook into a binder and then activate the workbook section, the Workbook_Open and Auto_Open macros in the workbook run automatically.

Because of a problem in Microsoft Office Binder 97, the macros are run two times when you first insert the workbook into Binder. Also, if you have selected the Macro Virus Protection option in Microsoft Excel 97, you may be warned twice about macros in the workbook.

Additional query words: OFF97 XL97

Keywords          : xlvbainfo OffVBA offbinder 
Version           : WINDOWS:97
Platform          : WINDOWS
Issue type        : kbbug

Last Reviewed: May 19, 1999