请大家帮我看看这段代码正不正确????
来源:百度知道 编辑:UC知道 时间:2024/06/30 17:36:45
private sub command1_click()
for i = 0 to 2
if option1(i).value = true then
print "您所在的城市是" + opt(i).caption
end if
next
end sub
for i = 0 to 2
if option1(i).value = true then
print "您所在的城市是" + opt(i).caption
end if
next
end sub
应该改成下面的
Private Sub command1_click()
If Option1.Value = True Then
Print "您所在的城市是" + Option1.Caption
ElseIf Option2.Value Then
Print "您所在的城市是" + Option3.Caption
ElseIf Option3.Value Then
Print "您所在的城市是" + Option3.Caption
End If
End Sub
private sub command1_click()
for i = 0 to 2
if option1(i).value = true then
print "您所在的城市是" & opt(i).caption
end if
next i
end sub