Microsoft KB Archive/172043: Difference between revisions

From BetaArchive Wiki
(importing KB archive)
 
m (Text replacement - """ to """)
 
Line 12: Line 12:
<div id="TitleRow">
<div id="TitleRow">


= <span id="KB172043"></span>XL97: &quot;Auto_Open_xlquery_DClick&quot; Error Appears Opening File =
= <span id="KB172043"></span>XL97: "Auto_Open_xlquery_DClick" Error Appears Opening File =




Line 88: Line 88:
<pre class="codesample">      Sub StartupCode()
<pre class="codesample">      Sub StartupCode()
                         </pre></li>
                         </pre></li>
<li>On the File menu, click &quot;Close and Return to Microsoft Excel.&quot;</li>
<li>On the File menu, click "Close and Return to Microsoft Excel."</li>
<li>On the File menu, click Save As. In the Save As dialog box, change the file type to Microsoft Excel Workbook (*.xls).</li>
<li>On the File menu, click Save As. In the Save As dialog box, change the file type to Microsoft Excel Workbook (*.xls).</li>
<li>On the File menu, click Close, and then reopen the file in Excel 97. Press ALT+F11 to start the Visual Basic Editor.</li>
<li>On the File menu, click Close, and then reopen the file in Excel 97. Press ALT+F11 to start the Visual Basic Editor.</li>
Line 95: Line 95:
<pre class="codesample">      Sub Auto_Open().
<pre class="codesample">      Sub Auto_Open().
                         </pre></li>
                         </pre></li>
<li>On the File menu, click &quot;Close and Return to Microsoft Excel.&quot; On the File menu, click Save, and then click Close.<br />
<li>On the File menu, click "Close and Return to Microsoft Excel." On the File menu, click Save, and then click Close.<br />
<br />
<br />
When you reopen the file, the error message does not appear.</li></ol>
When you reopen the file, the error message does not appear.</li></ol>

Latest revision as of 11:06, 21 July 2020

Knowledge Base


XL97: "Auto_Open_xlquery_DClick" Error Appears Opening File

Article ID: 172043

Article Last Modified on 10/22/2000



APPLIES TO

  • Microsoft Excel 97 Standard Edition



This article was previously published under Q172043


SYMPTOMS

When you open a file in Microsoft Excel 97 for Windows, you may receive the following error message:

Cannot find Auto_Open_xlquery_DClick, which has been assigned to run each time [File Name]Sheet Name is opened. Continuing could cause errors. Cancel opening [File Name]Sheet Name?

CAUSE

This problem occurs if all of the following conditions are true:

  • You create a file with an Auto_Open macro in Excel 97. -and-


  • You create a query in Microsoft Query that returns data to Excel, and you store the query in the file. -and-


  • You save the file in the Microsoft Excel 5.0/95 Workbook (*.xls) format.


WORKAROUND

To work around this problem, follow these steps:

  1. Open the file in Excel 97, press ALT+F11 to start the Visual Basic Editor.
  2. In the Project window, click the plus sign (+) next to Modules. Click the module that contains the Auto_Open macro to select it.
  3. Locate the Auto_Open macro and rename it. To do this, change the first line of the macro.

    For example, if the first line of the macro is the following

           Sub Auto_Open()
                            

    change it to

           Sub StartupCode()
                            
  4. On the File menu, click "Close and Return to Microsoft Excel."
  5. On the File menu, click Save As. In the Save As dialog box, change the file type to Microsoft Excel Workbook (*.xls).
  6. On the File menu, click Close, and then reopen the file in Excel 97. Press ALT+F11 to start the Visual Basic Editor.
  7. In the Project window, click the plus sign (+) next to Modules. Click the module that contains the renamed macro to select it.
  8. Rename the macro with the following name:

           Sub Auto_Open().
                            
  9. On the File menu, click "Close and Return to Microsoft Excel." On the File menu, click Save, and then click Close.

    When you reopen the file, the error message does not appear.


STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.

Keywords: kberrmsg kbbug KB172043