Am I the only one?

Skyybot

Well-known Member
Joined
Feb 18, 2023
Messages
875
Office Version
  1. 365
Platform
  1. Windows
Am I the only one who thinks that On Error statements should only be used when an error is expected, and not to bypass unexpected results?
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Simple answer is no your not the only one ;)
 
It depends on what you mean by that. In many cases expected errors can be worked around without an error handler. Unexpected ones clearly can't.
 
Just to clarify my comment I use error handlers like On Error Resume Next to bypass expected errors for instance when using SpecialCells, then immediately resetting the handler.
If I think there is a possibility of an error then I might have an error handler there to take me to a message telling me the reason for the error while testing so that I could look into recoding it.
If it is totally unexpected then I probably wouldn't have an error handler in the code to start with as I don't randomly put them in my codes
 

Forum statistics

Threads
1,216,503
Messages
6,131,020
Members
449,615
Latest member
Nic0la

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top