以下是FOR+IF迴圈當True的時候做~
For i = 19 To 36
If Controls("OptionButton" & i) = True Then
TextBox1 = TextBox1 & " " & Controls("OptionButton" & i).Caption & "〈" & CommandButton9.Caption & "〉"
Controls("OptionButton" & i).Value = False
Exit For
End If
Next i
那如果都OptionButton都沒有被選取的時候做~我該怎麼寫?
我自行改寫後~失敗~如下
For i = 19 To 36
If Controls("OptionButton" & i) = True Then
TextBox1 = TextBox1 & " " & Controls("OptionButton" & i).Caption & "〈" & CommandButton9.Caption & "〉"
Controls("OptionButton" & i).Value = False
Exit For
Else
TextBox1 = CommandButton9.Caption
End If
Next i作者: av8d 時間: 2012-7-29 23:08