第1个回答 推荐于2017-09-09
'boolean 是表示真假的一种变量类型
Private Sub Command1_Click()
Dim b As Boolean, nStr As String
nStr = "5"
' nStr = "A"
b = IsNumeric(nStr)
If b = True Then '也可以写成:If b Then
MsgBox "这是一个数字字符:" & nStr
Else
MsgBox "这不是一个数字字符:" & nStr
End If
End Sub本回答被提问者采纳
第2个回答 2009-06-24
呵呵分支用的
dim a as boolean
if checkbox1.checked=true then
a=true
else
a=false
endif
if a=true then
msgbox("左转……")
else
msgbox("右转……")
endif
第3个回答 2009-06-24
dim a as boolean
sub ccc()
a=true
msgbox a
end sub