'Using' 陳述式中的 'On Error' 陳述式無效

更新:2007 年 11 月

On Error 陳述式出現在 Using 陳述式內,但是在該內容中無效。

錯誤 ID:BC36013

若要更正這個錯誤

  • 使用結構化錯誤處理,例如 Try…Catch 區塊,取代 On Error 陳述式。

請參閱

工作

HOW TO:在 Visual Basic 中使用 Try…Catch 區塊測試程式碼

概念

Visual Basic 的結構化例外處理概觀

選擇何時使用結構化和非結構化例外處理

參考

On Error 陳述式 (Visual Basic)

Try...Catch...Finally 陳述式 (Visual Basic)