ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Cancelling a macro (https://www.excelbanter.com/excel-programming/325534-cancelling-macro.html)

Naive

Cancelling a macro
 
Hi there,

A few years back I use to write macros, and had some
standard code or functon that would not run the macro if
the macro would generate an error.
Thus no macro actually ran as opposed to half a macro
running and then causing an error.
I seem to recall it was relatively easy to do, but can no
longer remember for the life of me how to do. It wasn't
undoing a macro. Simply not running it if it would crash.


Any help is greatly appreciated.

Naive

Lonnie M.

Cancelling a macro
 
Hi, there are a number of "On Error" options that you could look at.
One being "On Error Exit Sub".

HTH--Lonnie M.



All times are GMT +1. The time now is 03:41 PM.

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