VBA Error window has changed - no more Debug button

mcomp72

Active Member
Joined
Aug 14, 2016
Messages
308
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
I'm not sure how or when this happened, but the look of the VBA error windows I receive has changed. I've created an image to show you what they looked like before, and what they look like now.

VBA-Error-change.png

This is a big problem, because when my code has an error, I can no longer use the Debug button to take me to the line where the error occurred.

I have been working on my Macro-Enabled workbook for several months now, and it did not use to do this. I have no idea what I did to change the way the errors look. As a test, I tried a new workbook, and the error on that one looks the way it should (like the BEFORE image), so it doesn't seem to be a change in Excel itself.

I also tried my workbook on another computer, and the same problem occurred. So I'm guessing there is something in my code that is causing this? I have no idea what it might be. Anyone have any ideas?
 
JoeMo, how do you have it set in VBE -> Tools -> Options -> General? Do you have Break in Class Module selected?
 
Upvote 0

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
So that looks like it has fixed my problem! Thank you!!
Glad we could help & thanks for the feedback.

I think that if you use either "Break on all errors" or "Break in class module" it should work.
 
Upvote 0
In the VB editor select tools > options > General > Break in class module > OK.

Do you now get the "Normal" dialogue box?
Fluff, are you indicating that the "Break in class module" button should be filled? Its not for me and I get the "Normal" dialog boxes.
 
Upvote 0
Joe
Do you have it set on "Break on all errors" or "Break on unhandled errors"?
 
Upvote 0
Joe
Do you have it set on "Break on all errors" or "Break on unhandled errors"?
It's been set on "Break on unhandled errors" from the start of my sometimes futile attempt to learn VBA. :laugh:

Another good catch Fluff - thanks!
 
Upvote 0
In that case my "fix" maybe wrong, if i run this from a sheet module
Code:
Sub Test()

Dim r As Range
r = ThisWorkbook.Sheets("Sheet1").Range("A1")

End Sub
with it set on "Break on unhandled errors" I don't get the debug button.
 
Upvote 0
In that case my "fix" maybe wrong, if i run this from a sheet module
Code:
Sub Test()

Dim r As Range
r = ThisWorkbook.Sheets("Sheet1").Range("A1")

End Sub
with it set on "Break on unhandled errors" I don't get the debug button.

Interesting. That is the same thing that had been happening to me, and I had mine set on "Break on unhandled errors", too. So I guess when you have it set that way, it is normal behavior for Excel? I had never noticed an error window without the Debug button before (other than a 400 error), so I was concerned that something had gone wrong with my workbook.
 
Upvote 0
Not sure if it's normal behaviour, as I've used "Break in class module" for years, so never had the problem.
It might always have been like that, or it might be that something has changed.
 
Upvote 0
In that case my "fix" maybe wrong, if i run this from a sheet module
Code:
Sub Test()

Dim r As Range
r = ThisWorkbook.Sheets("Sheet1").Range("A1")

End Sub
with it set on "Break on unhandled errors" I don't get the debug button.
Hmm, I get the debug button if I run that from a selection_change sheet module, or a standard module with the "Break on unhandled errors" setting. XL2010, Win10.
 
Upvote 0

Forum statistics

Threads
1,224,747
Messages
6,180,712
Members
452,995
Latest member
isldboy

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