Why do I get error msg "Application-defined or object-defined error" when I Reset in VBA?

Mackeral

Board Regular
Joined
Mar 7, 2015
Messages
249
Office Version
  1. 365
Platform
  1. Windows
Shouldn't VBA end at a "Reset" and not give an error message.

And once I click "Ok" on the error message, I can re-execute the macro with no restrictions.

Thanks for your help.
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
It might be helpful if you can post your code, so we can see exactly how it is written.
 
Upvote 0
When the program completes, no problem.
There are some EnableEvents on and offs though while the program runs. If I hit Esc and drop into the debugger and try to close VBA or Excel, then I get the error message.
Could that have something to do with the problem?

Mac
 
Upvote 0
Mac -

The error "Application-defined or object-defined error" is about the most common in VBA, and is about the least descriptive.

Joe asked to see some code. Without actual code that includes where the error occurs, it is not possible to help you.
 
Upvote 0

Forum statistics

Threads
1,224,827
Messages
6,181,194
Members
453,021
Latest member
pingpong7117

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