V
VaviaFla
Is there any way to add a control tip to a button created in a temporary
menu. The VBA help screens suggest 'yes' (since i just need a proper 'object'
to which to attach the tip text), but I get an error in runtime.
Here is what I have:
Set mybar = CommandBars.Add(name:="NewBar", Position:=msoBarFloating, _
Temporary:=True)
Set mybutton = CommandBars("NewBar").Controls.Add(Type:=msoControlButton)
With mybutton
.Style = msoButtonCaption
.Caption = "Next"
.OnAction = "FindNextText"
.ControlTipText="Next Item" <<------this does not work
End With
When I run the above code, the error message I get on the next to last line is
that the method is not supported. When I delete the line, and display the menu
in the ordinary course of business, and hover over the button, a control tip
type message appears (it's simply the name of the button), so it seems that
Word knows how to display a control tip in the menu; I just don't know how to
write the code to get it to do it. thanks for any help anyone can provide.
Betty
menu. The VBA help screens suggest 'yes' (since i just need a proper 'object'
to which to attach the tip text), but I get an error in runtime.
Here is what I have:
Set mybar = CommandBars.Add(name:="NewBar", Position:=msoBarFloating, _
Temporary:=True)
Set mybutton = CommandBars("NewBar").Controls.Add(Type:=msoControlButton)
With mybutton
.Style = msoButtonCaption
.Caption = "Next"
.OnAction = "FindNextText"
.ControlTipText="Next Item" <<------this does not work
End With
When I run the above code, the error message I get on the next to last line is
that the method is not supported. When I delete the line, and display the menu
in the ordinary course of business, and hover over the button, a control tip
type message appears (it's simply the name of the button), so it seems that
Word knows how to display a control tip in the menu; I just don't know how to
write the code to get it to do it. thanks for any help anyone can provide.
Betty