sub Main dim flg as Boolean = False Try '変数flgがFalseの場合 If flg = false Then 'Try〜Catch間から強制的にCatchへ飛ばす Throw New Exception End If Catch ex As Exception MsgBox(flg & "エラー") exit sub End Try end sub