ID: Q123264
5.00 5.00c WINDOWS kbprg kbcode kbtool
The information in this article applies to:
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.
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.
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
Version : 5.00 5.00c
Platform : WINDOWS
Last Reviewed: September 14, 1996