On Error GoTo for workbook

hajiali

Well-known Member
Joined
Sep 8, 2018
Messages
627
Office Version
  1. 2016
Platform
  1. Windows
VBA Code:
Sub AEETRUE()
        Application.EnableEvents = True
        Application.ScreenUpdating = True
        Application.DisplayAlerts = True
End Sub

Hello All need help with adding to my workbook that whenever an error occur on any of the Macros, Sheet Codes, or Userform codes in a workbook to display the error, call the Macro above. is there a easy way to accomplish this on the "ThisWorkbook" in VBA

any information is greatly appreciated.
 
I've complete some research via Google. It would appear establishing a 'global' error checker is possible. However, each sub / routine etc will still need
a statement if an error occurs, Excel needs to refer to the global error checker. THEN, there needs to be something in the global error checker that
references the specific sub / routine where the error occurred and what Excel should do about that error.

In short, you obtain the satisfaction of creating a global error checker but you are writing twice as much code to handle the errors. You might as well
utilize an error checker in each sub / routine and be done with it.

Use Google and search for 'vba global error checker'
 
Upvote 0

Forum statistics

Threads
1,226,797
Messages
6,193,051
Members
453,772
Latest member
aastupin

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