Hi, i need to check if previous checkbox is ticked, i tried like this but didn't work...
Can someone help me? Thanks
VBA Code:
Sub PrCHK()
Dim i, o As Integer
o = i - 1
For i = 1 To 6
If Worksheets("Sheet1").OLEObjects("CheckBox" & i).Object.Value = True And Worksheets("Sheet").OLEObjects("CheckBox" & o).Object.Value = False Then
MsgBox "Error"
End If
Next i
End Sub
Can someone help me? Thanks