PC Review


Reply
Thread Tools Rate Thread

ControlButton Size

 
 
Bishop
Guest
Posts: n/a
 
      29th May 2009
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 With Quote
 
 
 
 
JLGWhiz
Guest
Posts: n/a
 
      29th May 2009
Maybe:

With CBar.CTTally



"Bishop" <(E-Mail Removed)> wrote in message
news:A724AF72-4AC6-40B5-8F6F-(E-Mail Removed)...
> 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 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
Run Append Query from ControlButton on Form Tanya Microsoft Access Form Coding 3 10th Jan 2009 12:36 PM
How to enable / disable ControlButton added to Cell CommandBar Rob Blackmore Microsoft Excel Programming 3 15th Sep 2008 01:28 PM
LoadPicture for a ControlButton help micmacuk Microsoft Excel Programming 7 30th May 2006 08:44 PM
Call A Macro From A ControlButton Minitman Microsoft Excel Misc 5 27th Mar 2004 09:50 AM
re ControlButton numbers , Id:=??? mcpheat Microsoft Excel Programming 0 20th Jul 2003 12:52 PM


Features
 

Advertising
 

Newsgroups
 


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