ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Check Boxes (https://www.excelbanter.com/excel-discussion-misc-queries/42670-check-boxes.html)

Bruce

Check Boxes
 

How do I fill a column of 50 rows with check boxes ? Fill Down doesn't seem
to do it..

Best Wishes
Bruce
( Illegitimi non carborundum est )



Dave Peterson

Maybe you could just use a macro to populate the range you want.


Option Explicit
Sub addCBX()
Dim myCBX As CheckBox
Dim myCell As Range

With ActiveSheet
.CheckBoxes.Delete 'nice for testing
For Each myCell In .Range("a1:a50").Cells
With myCell
Set myCBX = .Parent.CheckBoxes.Add _
(Top:=.Top, Width:=.Width, _
Left:=.Left, Height:=.Height)
With myCBX
.LinkedCell = myCell.Address(external:=True)
.Caption = "" 'or whatever you want
.Name = "CBX_" & myCell.Address(0, 0)
End With
.NumberFormat = ";;;"
End With
Next myCell
End With
End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Bruce wrote:

How do I fill a column of 50 rows with check boxes ? Fill Down doesn't seem
to do it..

Best Wishes
Bruce
( Illegitimi non carborundum est )


--

Dave Peterson


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

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