A
amescha
Dear Excel folks,
I have the following code that adds a custom toolbarand adds four identical
buttons to the toolbar. It works just fine except I want to change the
appearances of three of the buttons so that they aren't just all smiley
faces. I don't need to edit the button images as bitmaps or anything fancy,
just one of the standard button images is fine. Also, if possible, I would
like to add whatever those little pop-up screen tips are called when you have
the mouse pointer on a button.
Sub AddButtonTest2()
'
' AddButtonTest2 Macro
' Macro recorded 9/24/2004 by Knight ITC
'
' File name = EquGen.xls
' Toolbar name = EquationCopies
' Toolbar starts without any buttons
' 1st Macro name = CopytoEquationGenerator
' 2nd Macro name = CopytoEquationGeneratorTarget
' 3rd Macro name = CopytoErrorAnalysis
' 4th Macro name = CopytoErrorAnalysis
Dim Cmd As CommandBarButton
Application.CommandBars.Add(Name:="EquationCopies").Visible = True
Set Cmd = Application.CommandBars("EquationCopies").Controls.Add( _
Type:=msoControlButton, _
ID:=2950, Before:=1)
Cmd.Caption = "CopyTo"
Cmd.OnAction = "'EquGen.xls'!CopyToEquationGenerator"
Set Cmd = Application.CommandBars("EquationCopies").Controls.Add( _
Type:=msoControlButton, _
ID:=2950, Before:=2)
Cmd.Caption = "CopyTo"
Cmd.OnAction = "'EquGen.xls'!CopyToEquationGeneratorTarget"
Set Cmd = Application.CommandBars("EquationCopies").Controls.Add( _
Type:=msoControlButton, _
ID:=2950, Before:=3)
Cmd.Caption = "CopyTo"
Cmd.OnAction = "'EquGen.xls'!CopyToErrorAnalysis"
Set Cmd = Application.CommandBars("EquationCopies").Controls.Add( _
Type:=msoControlButton, _
ID:=2950, Before:=4)
Cmd.Caption = "CopyTo"
Cmd.OnAction = "'EquGen.xls'!CopyToErrorAnalysisTarget"
End Sub
Many thanks in advance!
amescha
Charles Ames
University of Oregon
I have the following code that adds a custom toolbarand adds four identical
buttons to the toolbar. It works just fine except I want to change the
appearances of three of the buttons so that they aren't just all smiley
faces. I don't need to edit the button images as bitmaps or anything fancy,
just one of the standard button images is fine. Also, if possible, I would
like to add whatever those little pop-up screen tips are called when you have
the mouse pointer on a button.
Sub AddButtonTest2()
'
' AddButtonTest2 Macro
' Macro recorded 9/24/2004 by Knight ITC
'
' File name = EquGen.xls
' Toolbar name = EquationCopies
' Toolbar starts without any buttons
' 1st Macro name = CopytoEquationGenerator
' 2nd Macro name = CopytoEquationGeneratorTarget
' 3rd Macro name = CopytoErrorAnalysis
' 4th Macro name = CopytoErrorAnalysis
Dim Cmd As CommandBarButton
Application.CommandBars.Add(Name:="EquationCopies").Visible = True
Set Cmd = Application.CommandBars("EquationCopies").Controls.Add( _
Type:=msoControlButton, _
ID:=2950, Before:=1)
Cmd.Caption = "CopyTo"
Cmd.OnAction = "'EquGen.xls'!CopyToEquationGenerator"
Set Cmd = Application.CommandBars("EquationCopies").Controls.Add( _
Type:=msoControlButton, _
ID:=2950, Before:=2)
Cmd.Caption = "CopyTo"
Cmd.OnAction = "'EquGen.xls'!CopyToEquationGeneratorTarget"
Set Cmd = Application.CommandBars("EquationCopies").Controls.Add( _
Type:=msoControlButton, _
ID:=2950, Before:=3)
Cmd.Caption = "CopyTo"
Cmd.OnAction = "'EquGen.xls'!CopyToErrorAnalysis"
Set Cmd = Application.CommandBars("EquationCopies").Controls.Add( _
Type:=msoControlButton, _
ID:=2950, Before:=4)
Cmd.Caption = "CopyTo"
Cmd.OnAction = "'EquGen.xls'!CopyToErrorAnalysisTarget"
End Sub
Many thanks in advance!
amescha
Charles Ames
University of Oregon