Can't enter break mode at this time

  • Hi.

    I'm having issues with deleting a line of code in my ThisWorkbook Workbook open event. it worked at one time then suddenly it stopped working. It doesn't give me an error when I run the program, but it just doesn't delete the line of code, like it should. When I open the sub and step through it I get the error code "Can't enter break mode at this time." I've checked to make sure the line number matched & I want to delete only that line.
    Your help will be greatly appreciated
    If I step through the file and get the error then hit continue or end it deletes the code like it should... but does not go to "End With"
    I tried to input the line "On Error Resume Next" to try to override the error...well that line of code doesn't work on anything that I've tried.


    i've cross-posted on 2 forums. Plenty of traffic but no suggestions

    https://www.excelforum.com/exc…his-time.html#post5248130

    https://www.excelguru.ca/forum…r-break-mode-at-this-time


    If I'm doing anything that doesn't fit in with Ozgrid forum, please explain to me. The moderators are great and I want to get things right.:S

    Thanks a ton


    Here is the code:

    Thanks for your help

    JimmyB


    Some plans fail on execution

    All plans fail without

    8)

  • Thanks Ashu, but that isn't an option. I'll be distributing the apps thousands of times (plan) and I need it to automatically delete this line of code after I've assigned a password to the file. I can't load the program each time...really not feasible...But thanks for the suggestion. really appreciate it

    JimmyB

    Thanks for your help

    JimmyB


    Some plans fail on execution

    All plans fail without

    8)

  • This means you need the code at first and not later why don't you use boolen expression stored in workbook hidden and use an if condition to bypass the code you want to delete, also if you are using some kind of loop use doevents to manage other events triggered by the macro

  • Well You know That's a good idea. I can use an if condition like you recommended if I have to, but it's driving me nuts. The code I'm using should work and it is cleaner than going around the problem. I just can't figure out why I get the error. I googled it and not getting any results either.

    Thanks for your help

    JimmyB


    Some plans fail on execution

    All plans fail without

    8)

  • Does anyone else have an idea on how to clear the "Can't enter break mode at this time". I would really like to know how to defeat this error.

    Thanks JimmyB

    Thanks for your help

    JimmyB


    Some plans fail on execution

    All plans fail without

    8)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!