PC Review


Reply
Thread Tools Rate Thread

change a tool tip

 
 
daniel
Guest
Posts: n/a
 
      7th Apr 2009
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


 
Reply With Quote
 
 
 
 
Gary Brown
Guest
Posts: n/a
 
      7th Apr 2009
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, Before:=1)
> tbb.OnAction = ThisWorkbook.Name + "!custommacro"
> .Width = 200
> .Visible = True
> End With
> End Sub
>
>

 
Reply With Quote
 
daniel
Guest
Posts: n/a
 
      7th Apr 2009
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


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

 
Reply With Quote
 
Chip Pearson
Guest
Posts: n/a
 
      7th Apr 2009

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

 
Reply With Quote
 
daniel
Guest
Posts: n/a
 
      7th Apr 2009
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
> <(E-Mail Removed)> 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"), Before:=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, Before:=1)
> >> tbb.OnAction = ThisWorkbook.Name + "!custommacro"
> >> .Width = 200
> >> .Visible = True
> >> End With
> >> End Sub
> >>
> >>

>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
can i change my tool bar? Anand Windows XP Basics 1 22nd Jul 2008 02:17 AM
How to change cell tool tip =?Utf-8?B?bWlrZV9taWtl?= Microsoft Excel Discussion 1 30th Mar 2006 06:09 AM
Tool Tips change Michael Windows XP General 2 18th Dec 2003 05:44 AM
Tool Tips change Michael Windows XP General 0 18th Dec 2003 04:31 AM
change password tool Jason King Microsoft Windows 2000 Active Directory 6 1st Oct 2003 03:42 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:10 AM.