Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 208
Default 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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default 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?



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 to enable / disable ControlButton added to Cell CommandBar Rob Blackmore Excel Programming 3 September 15th 08 01:28 PM
LoadPicture for a ControlButton help micmacuk Excel Programming 7 May 30th 06 08:44 PM
re ControlButton numbers , Id:=??? mcpheat Excel Programming 0 July 20th 03 12:52 PM
Can we write VBA code to set all column/row's size back to default size? Charles Williams Excel Programming 0 July 8th 03 03:56 PM
Can we write VBA code to set all column/row's size back to default size? Earle Excel Programming 0 July 8th 03 02:46 PM


All times are GMT +1. The time now is 05:00 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"