Excel: GET.TOOLBAR(9) Function Returns Incomplete Array of IDs

Last reviewed: November 30, 1994
Article ID: Q93492
The information in this article applies to:
  • Microsoft Excel for Windows, versions 4.0, 4.0a, 5.0
  • Microsoft Excel for the Macintosh, versions 4.0, 5.0

SUMMARY

When you start Microsoft Excel, the docked tool bars are loaded before the floating tool bars. The way these tool bars are loaded may present a problem if you are using an Auto_Open macro that uses the GET.TOOLBAR(9) function. Since the Auto_Open macro may be run before the floating tool bars are loaded, the GET.TOOLBAR(9) function will return an incomplete array of tool bar IDs.

MORE INFORMATION

The GET.TOOLBAR() function is used to return information about one tool bar or all tool bars. GET.TOOLBAR(9) returns an array of tool bar IDs for all visible tool bars.

The GET.TOOLBAR() function may not return a complete array of tool bar IDs if you use it in an Auto_Open macro (a macro that loads automatically when you start Microsoft Excel). The following situations will cause the macro to run before the floating tool bars are loaded, which will result in an incomplete array of tool bar IDs.

Microsoft Excel for the Macintosh and Microsoft Excel for Windows

  • Placing the sheet containing the Auto_Open macro in the XLSTART subdirectory in Microsoft Excel for Windows or placing it in the Startup Folder in Microsoft Excel for the Macintosh.

Microsoft Excel for Windows

  • Using an "open=" entry in the EXCEL4.INI (version 4.0) or EXCEL5.INI (version 5.0) to automatically open the sheet containing the Auto_Open macro when you start Microsoft Excel.

    -or-

  • Using an icon command line of "C:\Excel\Excel.exe\filename.xls" Where filename.xls is the file containing the reference to the Auto_Open macro.

Workaround for Microsoft Excel for Windows

To load the floating tool bars before the macro is started, use one of the following methods to start Microsoft Excel:

  • Create an icon for Microsoft Excel with a command line of "filename.xls", where filename.xls is the file containing the reference to the Auto_Open macro.
  • From the File menu in Windows File Manager, choose the Run command to start "filename.xls", where filename.xls is the file containing the reference to the Auto_Open macro.

There is no workaround for Microsoft Excel for the Macintosh.

REFERENCES

"Online Help," version 5.0 "Function Reference," version 4.0, pages 206-207


KBCategory: kbprb
KBSubcategory:

Additional reference words: 4.0 4.00 4.0a 4.00a 5.0 5.00
float tool bar


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: November 30, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.