MrsGExcel95
New Member
- Joined
- Mar 1, 2016
- Messages
- 3
Hi All,
At the moment I have a code that adds checkboxes to a dynamic table (i.e. it could be 100 rows, or it could be 5 rows).
I am trying to write a code that says: "if the value next to a checkbox is "TRUE", then please select this cell and call another module.
Many thanks,
MrsGExcel95
At the moment I have a code that adds checkboxes to a dynamic table (i.e. it could be 100 rows, or it could be 5 rows).
I am trying to write a code that says: "if the value next to a checkbox is "TRUE", then please select this cell and call another module.
Code:
Dim rng As Range
Dim cell As Variant
Dim lastrow As Long
Dim sht As Worksheet
Set sht = ThisWorkbook.Worksheets("Overview")
lastrow = sht.Cells(sht.Rows.Count, "M").End(xlUp).Row
Set rng = Sheets("Overview").Range("Q8:Q" & lastrow)
For Each cell In rng
If cell.Value = True Then
ActiveCell.Select
Call Amendit
End If
Next
Many thanks,
MrsGExcel95