📄 module1.bas
字号:
Attribute VB_Name = "Module1"
Option Explicit
Public tmp As String '声明TMP为临时变量
Public yjj As String '声明YJJ为字符型变量
Public Sub shuru(tmp As String)
yjj = "请输入应纳税所得额(或所得额)。"
a:
tmp = InputBox(yjj$, "提示信息!")
If Not IsNumeric(tmp) Then
MsgBox ("输入含有字母或其它字符,退出吗?"), , "提示信息"
GoTo a
ElseIf IsNumeric(tmp) Then
MsgBox ("输入的应纳税所得额为:" & tmp & "元"), , "提示信息"
GoTo ab
Else
MsgBox ("退出吗?"), , "提示信息"
End If
ab:
If Len(tmp) > 12 Then
MsgBox ("输入的数字过大,请重新输入!"), , "提示信息"
GoTo a
ElseIf Len(tmp) <= 12 Then
Exit Sub
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -