Article ID: 171309 - Last Review: October 21, 2000 - Revision: 1.0 XL97: Macro Error When You Use GET.TOOLBAR CommandThis article was previously published under Q171309 SYMPTOMS
In Microsoft Excel 97, when you run a macro written in the Microsoft Excel
Macro language (XLM), you may receive an error message similar to the
following:
Macro error at cell: [Book3]Macro1!A10 CAUSE
This problem occurs if the XLM macro contains a line of code that uses the
GET.TOOLBAR command with a type_num argument of 1, for example:
RESOLUTION
To correct this problem, install Microsoft Excel 97 Service Release 1
(SR-1).
STATUS
Microsoft has confirmed this to be a problem in Microsoft Excel 97. This
problem was corrected in Microsoft Excel 97 SR-1.
For additional information about SR-1, please see the following article in the Microsoft Knowledge Base: 172475
(http://support.microsoft.com/kb/172475/EN-US/
)
OFF97: How to Obtain and Install MS Office 97 SR-1
MORE INFORMATION
In an XLM macro, you can use the GET.TOOLBAR command to return information
about a single toolbar or all toolbars. If you use a type_num argument of
1, the GET.TOOLBAR command returns a horizontal array of all tool IDs on
the specified toolbar ordered by position. For example, to display all of
the IDs for tools on the Standard toolbar, use XLM code similar to the
following:
This code does not work correctly in Microsoft Excel 97 because the GET.TOOLBAR command fails with a type_num of 1. However, the code works correctly in Microsoft Excel 97 SR-1. | Article Translations
|

Back to the top
