When does ON ERROR reset?

mark hansen

Well-known Member
Joined
Mar 6, 2006
Messages
511
I found a problem in a spreadsheet where a userform was looking for the last row. It found and incorrect list if the sheet is filtered. More searching found I need to use ShowAllData before I look for the last row. That caused an error if there were no filters set. So more searching I found I could use On error resume Next which works.

My question is when the On Error reset and go back to stopping and display the error, so I can look at it?

I have the first ShowAllData when I open the work book and another one as I open the userform that asks for data that is then added to the sheet.

Is the On Error Resume Next going to stay in effect the whole time I have the work book open?

Thanks,
Mark
 

Some videos you may like

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

mark hansen

Well-known Member
Joined
Mar 6, 2006
Messages
511
Thanks for the quick reply. That's a very good reference I'll use while I tighten up my project. I currently have the code in a module and use a Call ResetFilter to make sure the filters are gone as I set up the user form. If I understood you correctly, the rest of the user form will show errors (which is what I want as I build it) until I can finish it.

Thanks for your help.

Mark
 

Watch MrExcel Video

Forum statistics

Threads
1,123,481
Messages
5,601,918
Members
414,482
Latest member
morkar

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
Top