On Error End Sub

Farah

Board Regular
Joined
Oct 4, 2005
Messages
98
Hello,

I am getting an error "Run Time Error 424; object required" Continue, End, Debug etc. I know why am i getting this error.

I want that this error doesn't show. or maybe come back to excel sheet again witout any action.

I have tried the followings, but they don't seem to work.

On error GoTo 0
On error Resume Next (but this is not what i want)
Application.DisplayAlerts = False.


Warm Regards,
Farah
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092
Try something like this:

Code:
On Error Goto Handler
' Your code
On Error GoTo 0
Exit Sub
Handler:
If Err = 424 Then
'  code to tidy up
   Exit Sub
Else
   Err.Clear
   Resume Next
End If
 
Upvote 0

Forum statistics

Threads
1,195,838
Messages
6,011,886
Members
441,651
Latest member
drewe2000

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