Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

StatusBar

Status
Not open for further replies.

Tronsliver

Technical User
Sep 19, 2000
120
US
OK I'm having trouble having a custom toolbar display a new statusbar message when I run the mouse pointer over the button. I'm using a custom button but the new message "calculate" won't display. Here is the code:

Public Sub AutoRunSheet1()
Toolbars.Add "ClearTools1"
Toolbars("ClearTools1").Visible = True
Toolbars("ClearTools1").Position = xlLeft
Toolbars("ClearTools1").ToolbarButtons.Add_ 229, , "FindDelta", , , "Calculate"
End Sub

Thanks
 
Hi,

You ought to be using the CommandBar object - ToolBar is OLD.
Code:
   CommandBars("ClearTools1").Delete
    Set myBar = CommandBars.Add(Name:="ClearTools1", _
    Position:=msoBarLeft, Temporary:=True)
    myBar.Visible = True
    Set myControl = myBar.Controls _
    .Add(Type:=msoControlButton, ID:=1)
    With myControl
        .DescriptionText = "Calculates stuff"
        .Caption = "Calculate"
        .OnAction = "FindDelta"
    End With
THe caption works with this - dont know about toolbar. :)
Skip,
metzgsk@voughtaircraft.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top