PC Review


Reply
Thread Tools Rate Thread

Check Box Control

 
 
=?Utf-8?B?TXIuIE1hdHQ=?=
Guest
Posts: n/a
 
      20th Apr 2007
I've inserted a checkbox from the Control Toolbar into a worksheet, but I
can't change it's size or justification. I'd like it to be centered,
horizontally and vertically, in whatever cell I put it in, no matter the size
of that particular cell. I'd also like it to be larger.
Any ideas?

Thanks
 
Reply With Quote
 
 
 
 
merjet
Guest
Posts: n/a
 
      20th Apr 2007
Sizing it or moving it must be done in in Design Mode. On the Control
Toolbox toolbar use the first icon.

Hth,
Merjet


 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      20th Apr 2007
Maybe you can modify this to what you want:

Option Explicit
Sub testme()

Dim myCell As Range
Dim myRng As Range
Dim wks As Worksheet
Dim myCBX As OLEObject

Set wks = Worksheets("sheet1")

With wks
Set myRng = .Range("a1:a10")
End With

For Each myCell In myRng.Cells
With myCell
Set myCBX = .Parent.OLEObjects.Add _
(ClassType:="Forms.CheckBox.1", _
Link:=False, _
DisplayAsIcon:=False, _
Left:=.Left + (.Width / 2), _
Width:=.Width / 2, _
Height:=.Height)

With myCBX
.Placement = xlMoveAndSize
.LinkedCell = myCell.Address(external:=True)
.Object.Caption = ""
.Name = "CBX_" & myCell.Address(0, 0)
End With

.NumberFormat = ";;;"

End With
Next myCell

End Sub


Mr. Matt wrote:
>
> I've inserted a checkbox from the Control Toolbar into a worksheet, but I
> can't change it's size or justification. I'd like it to be centered,
> horizontally and vertically, in whatever cell I put it in, no matter the size
> of that particular cell. I'd also like it to be larger.
> Any ideas?
>
> Thanks


--

Dave Peterson
 
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
Update a date/time control when check box control is updated BrianP Microsoft Access Forms 6 10th Apr 2008 05:04 PM
how do i make a check box control other check boxes? =?Utf-8?B?TGVzbGV5?= Microsoft Access 1 27th Oct 2007 03:10 AM
how to check all check boxes in repeater control kris Microsoft ASP .NET 1 22nd Sep 2005 08:16 PM
how to check all check boxes in repeater control kris Microsoft ASP .NET 0 22nd Sep 2005 07:29 PM
how to check all check boxes in repeater control kris Microsoft ASP .NET 0 22nd Sep 2005 07:29 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:43 PM.