XL97: "Method 'Delete' of Object..." Running Sample Code in Help (174492)
The information in this article applies to:
- Microsoft Excel 97 for Windows
This article was previously published under Q174492 SYMPTOMS
After you use sample code from the Visual Basic for Applications Help file,
you may receive the following error message:
Run time error '-2147467259(80004005)':
Method 'Delete' of object 'CommandBar' failed.
CAUSE
This error may occur when the follow conditions are true:
WORKAROUNDMicrosoft provides programming examples 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 article assumes
that you are familiar with the programming language being demonstrated and the
tools used to create and debug procedures. Microsoft support professionals can
help explain the functionality of a particular procedure, but they will not
modify these examples to provide added functionality or construct procedures to
meet your specific needs. If you have limited programming experience, you may
want to contact a Microsoft Certified Partner or the Microsoft fee-based
consulting line at (800) 936-5200. For more information about Microsoft Certified
Partners, please visit the following Microsoft Web site:
For more information about the support options that are available and about how to contact Microsoft, visit the following Microsoft Web site:
To workaround this problem, use one of the following methods.
Method 1
Delete the Wizard command bar by running a procedure, and then use the code
from the Help file. To remove the command bar, use the following code:
Sub Remove_Wizard()
Set oToolMenu = CommandBars("Worksheet Menu Bar").Controls("Tools")
oToolMenu.Controls("Wizard").Delete
End Sub
Method 2
Remove the Wizard command bar by using the Add-Ins dialog box. To do this,
follow these steps:
- On the Tools menu, click Add-Ins.
- Click to clear the Conditional Sum Wizard, File Conversion Wizard,
Lookup Wizard, and Web Form Wizard check boxes.
NOTE: It's possible that not all of these add-ins are selected. These
four add-ins are included with Excel. If you installed a new add-in that
appears on the Wizard command bar, it may be necessary to remove it.
- Click OK.
Method 3
Remove the Small Business Financial Manager add-in. To do this, follow
these steps:
- On the Tools menu, click Add-Ins.
- Click to clear the Small Business Financial Manager check box.
- Click OK.
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. REFERENCES
For more information about command bars, click the Office Assistant in the
Visual Basic Editor, type commandbars click Search, and then click to
view "Using command bars."
NOTE: If the Assistant is hidden, click the Office Assistant button on the
Standard toolbar. If Visual Basic for Applications Help is not installed on
your computer, please see the following article in the Microsoft Knowledge
Base:
120802
Office: How to Add/Remove a Single Office Program or Component
Modification Type: | Major | Last Reviewed: | 6/23/2005 |
---|
Keywords: | kbbug kbcode kberrmsg kbProgramming KB174492 |
---|
|