CheckBox and Data Selection
For each checkbox object, try the following code and
modify the condition criteria for each of them.
Private Sub CheckBox1_Click()
Range("A1").Select
If CheckBox1.Value = True Then
Do Until ActiveCell = ""
If ActiveCell = "100" Then
ActiveCell.Offset(columnoffset:=1) = "x"
End If
ActiveCell.Offset(rowoffset:=1).Activate
Loop
End If
End Sub
-----Original Message-----
Hi All,
I have several checkBoxes in my UserForm.
In My sheet1 column A i have the following
Branch No
100
101
102
102
103
101 ..
the caption of the CheckBox starts with these 3 digit.
for eg. CheckBox1.caption is 100-Head Office and
CheckBox2.caption is 101-Branch1
I want add an X corresponding to each Branch if the
checkBox is selected.
for eg. if CheckBox1 and CheckBox2 are selected then I
want to add X in column B for each 100 and 101 in sheet1
How can I do this using VBA?
TIA
Soniya
.
|