ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   on error exit sub (https://www.excelbanter.com/excel-programming/335089-error-exit-sub.html)

short_n_curly[_22_]

on error exit sub
 

as the title says how can it be done i assume it has to go to an erro
handler but any help would be apprechiated thank

--
short_n_curl
-----------------------------------------------------------------------
short_n_curly's Profile: http://www.excelforum.com/member.php...fo&userid=2157
View this thread: http://www.excelforum.com/showthread.php?threadid=38875


davidm

on error exit sub
 

Place the error handler flag next to "End Sub" viz:

Sub test()

On error GoTo errhandler

<code here


errhandler:
End Sub


--
davidm
------------------------------------------------------------------------
davidm's Profile: http://www.excelforum.com/member.php...o&userid=20645
View this thread: http://www.excelforum.com/showthread...hreadid=388754



All times are GMT +1. The time now is 05:35 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com