ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   ControlButton Size (https://www.excelbanter.com/excel-programming/429166-controlbutton-size.html)

Bishop

ControlButton Size
 
Here is my code:

Sub AddCustomControl()

Dim CBar As CommandBar
Dim CTTally As CommandBarControl 'Catalyst To Tally
Dim PFNum As CommandBarControl 'PF Number
Dim CRData As CommandBarControl 'Clear Rep Data

Set CBar = CommandBars("TSToolBar")
Set CTTally = CBar.Controls.Add(Type:=msoControlButton)
Set PFNum = CBar.Controls.Add(Type:=msoControlButton)
Set CRData = CBar.Controls.Add(Type:=msoControlButton)

With CTTally
.FaceId = 1763
.Height = 20
.Width = 20
.OnAction = "CatalystToTally"
End With

With PFNum
.FaceId = 643
.Height = 20
.Width = 20
.OnAction = "PFNumber"
End With

With CRData
.FaceId = 67
.Height = 20
.Width = 20
.OnAction = "ClearRepData"
End With

CBar.Visible = True

End Sub

No matter what value I assign to .Height and .Width the icons are always the
same size. How can I make them bigger?

JLGWhiz[_2_]

ControlButton Size
 
Maybe:

With CBar.CTTally



"Bishop" wrote in message
...
Here is my code:

Sub AddCustomControl()

Dim CBar As CommandBar
Dim CTTally As CommandBarControl 'Catalyst To Tally
Dim PFNum As CommandBarControl 'PF Number
Dim CRData As CommandBarControl 'Clear Rep Data

Set CBar = CommandBars("TSToolBar")
Set CTTally = CBar.Controls.Add(Type:=msoControlButton)
Set PFNum = CBar.Controls.Add(Type:=msoControlButton)
Set CRData = CBar.Controls.Add(Type:=msoControlButton)

With CTTally
.FaceId = 1763
.Height = 20
.Width = 20
.OnAction = "CatalystToTally"
End With

With PFNum
.FaceId = 643
.Height = 20
.Width = 20
.OnAction = "PFNumber"
End With

With CRData
.FaceId = 67
.Height = 20
.Width = 20
.OnAction = "ClearRepData"
End With

CBar.Visible = True

End Sub

No matter what value I assign to .Height and .Width the icons are always
the
same size. How can I make them bigger?





All times are GMT +1. The time now is 02:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com