Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 354
Default change a tool tip

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, Befo=1)
tbb.OnAction = ThisWorkbook.Name + "!custommacro"
.Width = 200
.Visible = True
End With
End Sub


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 236
Default change a tool tip

If you don't believe Chip Pearson's answer, you shouldn't be in this forum.
--

Gary Brown



"daniel" wrote:

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, Befo=1)
tbb.OnAction = ThisWorkbook.Name + "!custommacro"
.Width = 200
.Visible = True
End With
End Sub


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 354
Default change a tool tip

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"), Befo=1
Set tbb = CommandBars("Test").Controls("Sum")
tbb.Style = msoButtonAutomatic
tbb.OnAction = ThisWorkbook.Name + "!MyAutoSumButtonMacro"
.Width = 200
.Visible = True
End With
End Sub


"daniel" wrote:

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, Befo=1)
tbb.OnAction = ThisWorkbook.Name + "!custommacro"
.Width = 200
.Visible = True
End With
End Sub


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default change a tool tip


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)


On Tue, 7 Apr 2009 11:56:12 -0700, daniel
wrote:

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"), Befo=1
Set tbb = CommandBars("Test").Controls("Sum")
tbb.Style = msoButtonAutomatic
tbb.OnAction = ThisWorkbook.Name + "!MyAutoSumButtonMacro"
.Width = 200
.Visible = True
End With
End Sub


"daniel" wrote:

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, Befo=1)
tbb.OnAction = ThisWorkbook.Name + "!custommacro"
.Width = 200
.Visible = True
End With
End Sub


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 354
Default change a tool tip

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


"Chip Pearson" wrote:


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)


On Tue, 7 Apr 2009 11:56:12 -0700, daniel
wrote:

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"), Befo=1
Set tbb = CommandBars("Test").Controls("Sum")
tbb.Style = msoButtonAutomatic
tbb.OnAction = ThisWorkbook.Name + "!MyAutoSumButtonMacro"
.Width = 200
.Visible = True
End With
End Sub


"daniel" wrote:

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, Befo=1)
tbb.OnAction = ThisWorkbook.Name + "!custommacro"
.Width = 200
.Visible = True
End With
End Sub



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you change the preset borders on the Formating Tool bar? wfmcguigan Excel Discussion (Misc queries) 2 February 5th 10 09:05 PM
Cannot change column name in Excel's MS Query tool Neall Excel Programming 0 September 15th 07 02:00 PM
change tool bar button image [email protected] Excel Discussion (Misc queries) 5 December 9th 05 07:00 PM
Change color of tool bar icons budcof Excel Discussion (Misc queries) 1 December 9th 05 03:17 PM
Can series tool change formulas over time when used to copy them compu_trainer Excel Worksheet Functions 3 May 26th 05 07:55 PM


All times are GMT +1. The time now is 06:55 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"