Page 1 of 5 123 ... LastLast
Results 1 to 10 of 47

Thread: VBA Error window has changed - no more Debug button

  1. #1
    Board Regular
    Join Date
    Aug 2016
    Posts
    153
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default VBA Error window has changed - no more Debug button

    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.


    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?

  2. #2
    Board Regular DanteAmor's Avatar
    Join Date
    Dec 2018
    Location
    México
    Posts
    6,874
    Post Thanks / Like
    Mentioned
    83 Post(s)
    Tagged
    15 Thread(s)

    Default Re: VBA Error window has changed - no more Debug button

    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.
    Regards Dante Amor

  3. #3
    MrExcel MVP
    Join Date
    May 2009
    Posts
    16,590
    Post Thanks / Like
    Mentioned
    39 Post(s)
    Tagged
    9 Thread(s)

    Default Re: VBA Error window has changed - no more Debug button

    Quote Originally Posted by mcomp72 View Post
    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.
    Joe

    When I was a young man I knew everything. Now that I'm older, I realize I know very little, and what I do know, I tend to forget!

  4. #4
    Board Regular
    Join Date
    Feb 2012
    Location
    Florida, USA
    Posts
    11,059
    Post Thanks / Like
    Mentioned
    25 Post(s)
    Tagged
    2 Thread(s)

    Default Re: VBA Error window has changed - no more Debug button

    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.
    Using Windows 10, Excel 2013.
    Any code provided by me should be tested on a copy or a mock-up of your file before applying it to your original file. Some actions generated by VBA code cannot be reversed with the undo facility in Excel. To open the VB editor, press Alt + F11. To run code from the Excel window, press Alt + F8. Please do not attempt to learn everything about VBA in one thread, especially from me. See this link for attaching images: Attachments

  5. #5
    Board Regular
    Join Date
    Aug 2016
    Posts
    153
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default Re: VBA Error window has changed - no more Debug button

    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:



    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 by mcomp72; Oct 16th, 2019 at 10:59 PM.

  6. #6
    MrExcel MVP
    Join Date
    May 2009
    Posts
    16,590
    Post Thanks / Like
    Mentioned
    39 Post(s)
    Tagged
    9 Thread(s)

    Default Re: VBA Error window has changed - no more Debug button

    Quote Originally Posted by mcomp72 View Post
    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:



    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?
    Joe

    When I was a young man I knew everything. Now that I'm older, I realize I know very little, and what I do know, I tend to forget!

  7. #7
    Board Regular
    Join Date
    Aug 2016
    Posts
    153
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default Re: VBA Error window has changed - no more Debug button

    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.

    Last edited by mcomp72; Oct 16th, 2019 at 11:13 PM.

  8. #8
    Board Regular
    Join Date
    Aug 2016
    Posts
    153
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default Re: VBA Error window has changed - no more Debug button

    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.

  9. #9
    MrExcel MVP ZVI's Avatar
    Join Date
    Apr 2008
    Location
    Sevastopol
    Posts
    3,654
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    3 Thread(s)

    Default Re: VBA Error window has changed - no more Debug button

    This can be just a msgbox, like this:
    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 by ZVI; Oct 16th, 2019 at 11:38 PM.
    Vladimir Zakharov

  10. #10
    Board Regular
    Join Date
    Aug 2016
    Posts
    153
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default Re: VBA Error window has changed - no more Debug button

    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.

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •