H
Herd
I am using the following code to create checkboxes and have the value offset.
How can I get the checked value to show "1" instead of "TRUE" in the offset
cell and to always show a blank ("") in the offset cells in which the
checkbox is not checked instead of "FALSE"?
Thanks for the help. It is appreciated.
Dim myCBX As CheckBox
Dim myCell As Range
With ActiveSheet
.CheckBoxes.Delete
For Each myCell In ActiveSheet.Range("B3:B800").Cells
With myCell
Set myCBX = .Parent.CheckBoxes.Add _
(Top:=.Top, Width:=.Width, _
Left:=.Left, Height:=.Height)
With myCBX
.LinkedCell = myCell.Offset(0, 10).Address(external:=True)
.Caption = ""
.Name = "CBX_" & myCell.Address(0, 0)
End With
.NumberFormat = ";;;"
End With
Next myCell
End With
How can I get the checked value to show "1" instead of "TRUE" in the offset
cell and to always show a blank ("") in the offset cells in which the
checkbox is not checked instead of "FALSE"?
Thanks for the help. It is appreciated.
Dim myCBX As CheckBox
Dim myCell As Range
With ActiveSheet
.CheckBoxes.Delete
For Each myCell In ActiveSheet.Range("B3:B800").Cells
With myCell
Set myCBX = .Parent.CheckBoxes.Add _
(Top:=.Top, Width:=.Width, _
Left:=.Left, Height:=.Height)
With myCBX
.LinkedCell = myCell.Offset(0, 10).Address(external:=True)
.Caption = ""
.Name = "CBX_" & myCell.Address(0, 0)
End With
.NumberFormat = ";;;"
End With
Next myCell
End With