Private Sub Command1_Click()
Dim s As Integer
s = Text1.Text
If s Mod 3 = 0 Then x = MsgBox("是3的倍数", vbOKOnly, "数值判断")
Else: If s Mod 3 <> 0 Then x = MsgBox("不是3的倍数", vbOKOnly, "数值判断")
End If
End Sub
Private Sub Command1_Click()
Dim s As Integer
s = Text1.Text
If s Mod 3 = 0 Then
x = MsgBox("是3的倍数", vbOKOnly, "数值判断")
Else
If s Mod 3 <> 0 Then
x = MsgBox("不是3的倍数", vbOKOnly, "数值判断")
End If
End If
End Sub
Private Sub Command1_Click()
Dim s As Integer
s = Text1.Text
If s Mod 3 = 0 Then x = MsgBox("是3的倍数", vbOKOnly, "数值判断")
If s Mod 3 <> 0 Then x = MsgBox("不是3的倍数", vbOKOnly, "数值判断")
End Sub
这样就可以了