我得到運行時錯誤,當我在輸入框從ISNUMERIC得到錯誤()VB.NET
Dim amount As String
amount = InputBox("Enter the amount of people you want to participtate", "System Message")
If amount < 0 Or Not (IsNumeric(amount)) Then
MsgBox("Please enter positive number of people", vbExclamation, "System Message")
End If
'如果金額<0'語句發生錯誤.. – matzone
請將Option Strict On放在代碼文件的頂部,或者在項目屬性中打開它。 –