UserErrorDef函數
用於傳回是否定義指定的使用者錯誤編號或標籤。
格式
UserErrorDef (使用者錯誤編號)
UserErrorDef (使用者錯誤標籤)
參數
- 使用者錯誤編號:表示使用者錯誤編號的整數值
- 使用者錯誤標籤:指定使用者錯誤標籤的字串運算式
傳回值
指定的使用者錯誤編號或使用者錯誤標籤已定義時傳回「True」,否則傳回「False」。
參照
UserErrorLabel$函數、UserErrorNumber函數
UserErrorDef函數範例
Integer i
For i = 8950 To 8999
If UserErrorDef(i) = TRUE Then
Print "UserError " , i, " is defined"
Else
Print "UserError " , i, " is undefined"
EndIf
Next i