VBA Error window has changed - no more Debug button

mcomp72

Active Member
Joined
Aug 14, 2016
Messages
275
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2011
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?
 
I'm sorry, I understood, the debug button was lost :oops:

I guess something in your version of excel-vba was updated.
 
Last edited:
Upvote 0

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
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.
Thanks for testing, have no good ideas then.
May be something is damaged in the workbook structure or in VBA compiled chains.
If possible please share that workbook for analyzing without sensitive data.
 
Last edited:
Upvote 0
If the project is password protected, then the debug button does not appear, since the code is not enabled until the correct password is entered.
 
Upvote 0
ZVI, unfortunately I'm not comfortable posting my workbook publicly, because it's something I plan to release as a commercial project one day, so I don't want a "free" copy floating out there with the source code easily viewable.

Is there a way for me to check to see if the file is damaged in some way? Or is this something that is very difficult to do?
 
Last edited:
Upvote 0
DanteAmor -- the thing is, if I create a new workbook, this problem does not happen. On a new workbook, I get the correct error window with the Debug button on it, just as I should. The problem only seems to be with this particular workbook. It did not use to do this. I only noticed it today.
 
Upvote 0
DanteAmor -- the thing is, if I create a new workbook, this problem does not happen. On a new workbook, I get the correct error window with the Debug button on it, just as I should. The problem only seems to be with this particular workbook. It did not use to do this. I only noticed it today.

If you don't have a password in the project, then you could copy the data from each sheet to the new book and also copy modules and userform to the new book.

When a sheet or book is damaged, sometimes it is not known what the problem is and everything has to be passed to a new book.
 
Upvote 0
I just discovered something I had not noticed before. I only get the different error window (the one without the Debug button) if the error is occurring inside a sheet module. If an error occurs in a regular module, I DO get the error window with the Debug button. Is this how Excel VBA normally behaves? I don't remember it being that way, but maybe I just don't remember it correctly? Can someone else let me which kind of error window they get if they encounter a run-time error in a sheet module? I'd be very curious to hear.
 
Upvote 0
I just discovered something I had not noticed before. I only get the different error window (the one without the Debug button) if the error is occurring inside a sheet module. If an error occurs in a regular module, I DO get the error window with the Debug button. Is this how Excel VBA normally behaves? I don't remember it being that way, but maybe I just don't remember it correctly? Can someone else let me which kind of error window they get if they encounter a run-time error in a sheet module? I'd be very curious to hear.
I get the debug run time error dialog box when I run the sheet code below.
Rich (BB code):
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim R As Long
'Next line generates runtime error if the sheet does not contain the string "BIG ERROR"
R = Cells.Find("BIG ERROR").Row
End Sub
 
Upvote 0
If I run JoeMo's code I also get the standard dialog box, using 365 on Win10
 
Upvote 0

Forum statistics

Threads
1,213,510
Messages
6,114,044
Members
448,543
Latest member
MartinLarkin

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