8
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
如果我離開的空場時,Excel返回Type Mismatch
錯誤。我想顯示一條消息。
+1的第一個正確的答案 - 儘管你想'如果爲IsEmpty(一)Then' – brettdj 2013-02-11 10:12:56
我+1佈雷特) – 2013-02-11 10:14:23
@brettdj爲什麼不你發佈自己的答案嗎? :) – 2013-02-11 10:15:59