laptop and a wrench

Bug

Custom Microsoft Visual Basic for Applications (VBA) toolbars are not recognized using the ICommandBars.Find method.

Last Published: October 10, 2017 ArcGIS for Desktop
Bug ID Number NIM062743
SubmittedNovember 11, 2010
Last ModifiedJune 5, 2024
Applies toArcGIS for Desktop
Version found10.0
Program languageVBA
Operating SystemWindows OS
Operating System VersionXP
StatusWill Not Be Addressed

Additional Information

VBA is not supported. Please migrate all code to .NET

Workaround

Sub FindBar() Dim pCmdBars As ICommandBars Set pCmdBars = ThisDocument.CommandBars Dim pNewBarX As ICommandBar Set pNewBarX = pCmdBars.Find("MyBar") ' If Find method did not get the new command bar above, retry ' with the prefix "Normal". If pNewBarX Is Nothing Then Set pNewBarX = pCmdBars.Find("Normal.MyBar") ' If Find method did not get the new command bar above, retry ' with the prefix "Project". If pNewBarX Is Nothing Then Set pNewBarX = pCmdBars.Find("Project.MyBar") If pNewBarX Is Nothing Then MsgBox "pNewBarX is still Nothing" End If End If End If pNewBarX.Add ArcID.File_AddData pNewBarX.Add ArcID.PanZoom_FullExtentEnd Sub

Steps to Reproduce

Bug ID: NIM062743

Software:

  • ArcGIS for Desktop

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options