VBA Error window has changed - no more Debug button

mcomp72

Active Member
Joined
Aug 14, 2016
Messages
305
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?
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
The error is because you are doing a division by 0. But that says the message, to review it, you could put your complete code.
 
Upvote 0
I'm not sure how or when this happened, but the look of the VBA error windows I receive has changed.
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?
Does this change apply to all run time errors or just to the division by zero error? I think the latter error has always resulted in the message box you show in your OP.
 
Upvote 0
I think it might be because the error is generated by Excel rather than VBA. But as @DanteAmor says, you can open the vb editor with Alt + F11 and step through the code to see where the condition was created. Most likely where you used vba to enter a formula in a cell.
 
Upvote 0
Those screenshots were not actually from my computer. I found them on the web. They are not actually the error I am experiencing right now. I just used them in my post to show what was happening.

The one I am experiencing at the moment is this:

Object-variable-error.png


This error most certainly used to not appear this way. I have seen this error dozens of times in the old window with the Debug button. No idea why it no longer will do that.
 
Last edited:
Upvote 0
Those screenshots were not actually from my computer. I found them on the web. They are not actually the error I am experiencing right now. I just used them in my post to show what was happening.

The one I am experiencing at the moment is this:

Object-variable-error.png


This error most certainly used to not appear this way. I have seen this error dozens of times in the old window with the Debug button. No idea why it no longer will do that.
Does this happen with one specific procedure only? And, what version of Excel are you using?
 
Upvote 0
No, it does not happen in one specific sub. I just tried putting in code that would create an error into several different subs across different sheets. Each time, the error looked like that.

I am running Excel 365 on Windows 10.

Just to be clear, this is the actual error I am dealing with right now, and here's how it used to look, and how it looks now.

VBA-error-change.png
 
Last edited:
Upvote 0
I just tried it on a Mac, running Excel 365. Same problem there. It's got to be something with my specific workbook, right? But what it might be, I haven't a clue.
 
Upvote 0
This can be just a msgbox, like this:
Rich (BB code):
Sub Test()
  On Error Resume Next
  Err.Raise 91  '<-- Error 91 simulation
  If Err Then MsgBox Err.Description, vbExclamation + vbMsgBoxHelpButton
End Sub
1. Check your code on presence of such a MsgBox with vbMsgBoxHelpButton
2. If not found then use VBE - Tools - Debug to find syntax code issue
 
Last edited:
Upvote 0
Hi ZVI. I'm not sure I understand what you're saying. But I did what I think you're suggesting.

I searched my entire project for "vbMsgBoxHelpButton" but it was not found. So there does not appear to be any code in my file similar to what you've posted.

In ran Debug -> Compile from the VBE, but it did not find any problems.
 
Upvote 0

Forum statistics

Threads
1,223,703
Messages
6,173,983
Members
452,540
Latest member
haasro02

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