Consulting

Results 1 to 2 of 2

Thread: All of code is not being executed

  1. #1
    VBAX Mentor
    Joined
    Jan 2006
    Posts
    323
    Location

    All of code is not being executed

    Hello all, attached is a short version of my spreadsheet which I am experiencing issues. If you take a look at sheet 204 and press the button to add a 204 sheet things work fine. If you then press the button to remove the 204 sheet, events will be disabled. I have put "application.enableevents = true" in what I thought were the appropriate places but it seems that I must be missing something. It appears that the problem lies within the "Remove_204" sub but when I put in breakpoints to trace the code, I get an error "cannot enter break mode" so I am having difficulty pinpointing my problem.
    Please take a look and tell me where I've gone wrong.
    I'm working with Excel 2010.

    thanks
    Gary
    Attached Files Attached Files

  2. #2
    VBAX Mentor
    Joined
    Jan 2006
    Posts
    323
    Location
    Please forgive my stupidity. I found my issue, in the Remove_204 sub it exits under an if statement. I added the enableevents = true and it works.

    Gary

Posting Permissions

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