I try to lock the Optionbutton within some frames, but I can't.
Following is my code. Any one can help me fix?
Dim ctl As Control
Dim Str() As String
Dim i1 as integer
Str = Split("fraTest,fraTest1,fraTest2,fraTest3,fraTest4,fraTest5,fraTest6,fraTest7", ","
For Each ctl In Form.Controls
For i1 = LBound(Str) To UBound(Str)
If ctl.Container Is Str(i1) Then
If TypeOf ctl1 Is OptionButton Then
ctl.Locked = False
End if
End If
Next i1
Next ctl
Following is my code. Any one can help me fix?
Dim ctl As Control
Dim Str() As String
Dim i1 as integer
Str = Split("fraTest,fraTest1,fraTest2,fraTest3,fraTest4,fraTest5,fraTest6,fraTest7", ","
For Each ctl In Form.Controls
For i1 = LBound(Str) To UBound(Str)
If ctl.Container Is Str(i1) Then
If TypeOf ctl1 Is OptionButton Then
ctl.Locked = False
End if
End If
Next i1
Next ctl