小编Osk*_*ger的帖子

VBA Excel,输入框不匹配为整数

我的代码

Dim a As Integer
a = InputBox("Enter the number", "Program", "", 7000, 6000)
If a = Empty Then
    ' do code...
Else
    MsgBox "Enter the number."
End If
Run Code Online (Sandbox Code Playgroud)

如果我留下一个空字段,Excel将返回Type Mismatch错误.我想显示一条消息.

excel vba excel-vba

9
推荐指数
2
解决办法
3万
查看次数

标签 统计

excel ×1

excel-vba ×1

vba ×1