Hi Hope you can help
is there a way to 'select' the adjacent cell for an activex checkbox, without referring to the cell by name.
the following code selects the correct cell, but I have to name change the code for every checkbox and I have dozens of them
This is part of a bigger picture - I have 'Private Sub Worksheet_SelectionChange(ByVal target As Range)'
that works fine but will not execute unless the cell in the target column is selected. so I need to automatically select the cell that the checkbox is in then select the cell in the target column which is offset(0,2)
stating the obvious in the example I have given you the checkbox is named 'TotalPaid3'
is there a way to 'select' the adjacent cell for an activex checkbox, without referring to the cell by name.
the following code selects the correct cell, but I have to name change the code for every checkbox and I have dozens of them
This is part of a bigger picture - I have 'Private Sub Worksheet_SelectionChange(ByVal target As Range)'
that works fine but will not execute unless the cell in the target column is selected. so I need to automatically select the cell that the checkbox is in then select the cell in the target column which is offset(0,2)
stating the obvious in the example I have given you the checkbox is named 'TotalPaid3'
Code:
If TotalPaid3.Value Then
TotalPaid3.TopLeftCell.Offset(0, 0).Select
TotalPaid3.TopLeftCell.Offset(0,2).Select
Else
TotalPaid3.TopLeftCell.Offset(0, 0).Select
TotalPaid3.TopLeftCell.Offset(0, 2).Select
End If
[code/]