Checkboxes?

  • Thread starter Thread starter hoffman3
  • Start date Start date
H

hoffman3

Is there a way to do checkboxes in a column within excel?
Eric Hoffma
 
Is there a way to insert checkboxes in place of a cell and do this for
whole column at the same time?
Eric Hoffma
 
This adds checkboxes from the Forms toolbar to a worksheet:

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

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top