Error-Handling Functions

Use the following statements and functions to define the way Collabora Office Basic reacts to run-time errors.

Collabora Office Basic offers several methods to prevent the termination of a program when a run-time error occurs.

CVErr Function

將字串型表示式或數值型表示式轉換為「錯誤」子類型的變體型表示式。

Erl Function

傳回程式執行期間出現錯誤的行號。

Err Function

傳回一個錯誤代碼,用於識別程式執行程序中出現的錯誤。

Err Object [VBA]

Use VBA Err object to raise or handle runtime errors.

IsError Function

測試變數是否包含錯誤值。

Error Function

Returns the error message that corresponds to a value or raises a given error context.

On Error GoTo ... Resume Statement

發生錯誤時啟動錯誤處理常式,或恢復程式執行。

Resume Statement

Resets error information and indicates what to execute next.

Please support us!