mattlightbourn
New Member
- Joined
- May 15, 2014
- Messages
- 4
Hi,
I have a set of Form Control check boxes on my Excel sheet which I have assigned to macros. However, for each row, I had had to create individual macros per row. Instead, I would like to just have the two macros below and use the format control cell link row number to set the checkRow value as below.
I have looked all over the various forums and either my search is too ambiguous or not specific enough. What I want to do is set the value of checkRow below by retrieving the LinkedCell value from the checkbox that I selected when clicking on it. Please can you help? Thanks, Matt
I have a set of Form Control check boxes on my Excel sheet which I have assigned to macros. However, for each row, I had had to create individual macros per row. Instead, I would like to just have the two macros below and use the format control cell link row number to set the checkRow value as below.
I have looked all over the various forums and either my search is too ambiguous or not specific enough. What I want to do is set the value of checkRow below by retrieving the LinkedCell value from the checkbox that I selected when clicking on it. Please can you help? Thanks, Matt
Code:
Sub CheckBox4_Click()
Dim checkRow As Long
checkRow = ??????????????
If Cells(checkRow, 8).Value = False Then
Cells(checkRow, 6).Value = True
Cells(checkRow, 7).Value = True
Cells(checkRow, 8).Value = True
End If
If Cells(checkRow, 8).Value = True Then
Cells(checkRow, 8).Value = True
End If
End Sub
Sub CheckBox3_Click()
Dim checkRow As Long
checkRow = ??????????????
If Cells(checkRow, 7).Value = False Then
Cells(checkRow, 6).Value = True
Cells(checkRow, 7).Value = True
End If
If Cells(checkRow, 7).Value = True Then
Cells(checkRow, 7).Value = True
End If
End Sub