Hey I am new to Excel VBA and need someone's help. Following is what I am looking for:
If a certain unlinked (form) checkbox(topleftcell?) is checked Then certain checkboxes below it(.offset?) will be checked off (if they are not already)
I can't use cell names since the same code above will apply to bunch of columns.
This is what I have sort of
Set aaa = ActiveSheet.CheckBoxes(Application.Caller)
With aaa.TopLeftCell
If aaa.Value = 1 Then
rsp = MsgBox("Check boxes below?", 4)
If rsp = vbYes Then
certain checkboxes(.offset?) below will be unchecked &
.offset(0,0).value= "na"
Let's say that your checkboxes are placed as shown in the image below. I deliberately didn't align them.
Ok here is a small trick that we will use. Right click on all checkboxes in
column 1
one by one and click onFormat Control
. Next go to theAlt Text
tab and type1
. For Column 2 checkboxes, type2
in theAlt text
. Repeat this for all 15 columns.Now assign the below macro to all the top checkboxes.
Now when you click the top most checkbox then it will check all the checkboxes below which have the same
Alt text
as the top checkbox.