XL5: Improving Performance Using XLODBC.XLA

Last reviewed: September 12, 1996
Article ID: Q123264
The information in this article applies to:
  • Microsoft Excel for Windows, versions 5.0, 5.0c

SUMMARY

When you use the ODBC add-in, XLODBC.XLA, to access Visual Basic SQL functions in Microsoft Excel, you can improve performance on your computer in some cases by running the Auto_Close macro either before you close the XLODBC.XLA file or before you close Microsoft Excel.

MORE INFORMATION

The XLODBC.XLA file contains an Auto_Close macro that, in some instances, releases allocated memory. However, this Auto_Close macro does not run when you use a Visual Basic procedure to close the file. Because of this behavior, when you use SQL functions provided by XLODBC.XLA in a Visual Basic procedure, use the following command in your procedure prior to a command that closes XLODBC.XLA or Microsoft Excel:

   Workbooks("xlodbc.xla").RunAutoMacros xlAutoClose

This command ensures that the Auto_Close macro in the XLODBC.XLA runs before the add-in file is closed.

Note that you do not need to use this command if you close Microsoft Excel manually, using the Close command on the File menu.

Microsoft provides examples of Visual Basic procedures 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 Visual Basic procedure is provided 'as is' and Microsoft does not guarantee that it can be used in all situations. Microsoft does not support modifications of this procedure to suit customer requirements for a particular purpose.

REFERENCES

For more information about the Microsoft ODBC Functions add-in for Microsoft Excel, choose the Search button in Help and type:

   ODBC


KBCategory: kbprg kbcode kbtool
KBSubcategory:

Additional reference words: 5.00



THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 12, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.