change a tool tip

D

daniel

what is the code to change the tool tip in this example:
Private Sub AddToolbar()
Dim tbb As Object
On Error Resume Next
Toolbars("Test").Delete
On Error GoTo 0
Set oTB = Toolbars.Add(Name:="Test")
With oTB
.Left = 117
.Top = 186
Set tbb = .ToolbarButtons.Add(Button:=23, Before:=1)
tbb.OnAction = ThisWorkbook.Name + "!custommacro"
.Width = 200
.Visible = True
End With
End Sub
 
D

daniel

gary
i believe him. i was working on the command code. he never said yes or no,
or maybe i misunderstood.:
Private Sub Addcontrol()
Dim tbb As Object
On Error Resume Next
Toolbars("Test").Delete
On Error GoTo 0
Set oTB = Toolbars.Add(Name:="Test")
With oTB
.Left = 117
.Top = 186
CommandBars("Auto Sum").Controls("Sum").Copy Bar:=CommandBars _
("Test"), Before:=1
Set tbb = CommandBars("Test").Controls("Sum")
tbb.Style = msoButtonAutomatic
tbb.OnAction = ThisWorkbook.Name + "!MyAutoSumButtonMacro"
.Width = 200
.Visible = True
End With
End Sub
 
C

Chip Pearson

i believe him. i was working on the command code. he never said yes or no,
or maybe i misunderstood.:

The answer to your control tip question is "No, you can't add control
tips to Excel.ToolbarButton objects." The answer to the broader
question of "what should you do?" is "Yes, use Office.CommandBar and
Office.CommandBarControl objects. They support control tips."

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
 
D

daniel

Mr. Pearson,
I apologize for my misunderstanding of your original explanation and thank
you for response and help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top