AnsweredAssumed Answered

How to find button in a toolbar?

Question asked by joseph.spang1 on Jul 24, 2014
Latest reply on Jul 24, 2014 by joseph.spang1

Hi All,


I'm trying to use the following script to add button to a toolbar.

I have no problem to add button but the command to find the button did not works!



Dim stdToolBar
Set stdToolBar = Gui.CommandBars("Standard")


Dim stdTBCtrls


'This command didn't works "FindBtnByToolTip"
Set stdTBCtrls = FindBtnByToolTip("Fit All", tbStandard)


If stdTBCtrls Is Nothing Then
       Set stdTBCtrls = stdToolBar.Controls
       Dim btnFA
       Set btnFA = stdTBCtrls.Add(cmdControlButton,,,15)
       btnFA.OnAction = "za"
       btnFA.TooltipText = "Fit All"
       btnFA.DescriptionText = "Fit all data to screen"
       btnFA.BitmapFile ="M:\CES_Standards\Expedition\PCB\Icons\view_all.bmp"
End If