Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: runtime error '17' - Can't perform operation

  1. #1
    Board Regular
    Join Date
    Mar 2007
    Location
    Spokane, WA
    Posts
    137
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default runtime error '17' - Can't perform operation

    I am running some code that has worked for months. I added a short while loop. This worked great. I then put an on error goto label line and include the label identifier. This worked great.

    In stepping through the code, I changed the goto statement and the actual label itself. When I did this, Excel told me that the code would need to be reset. I clicked ok. I then saved my work and tried to run the code again. Now it won't get passed compiling the vba project. In MS's help, it says "An operation can't be carried out if it would invalidate the current state of the project. . . To make such changes, you must stop the module from running, make the additions or changes, and then restart execution. " I can't get this to work. Anyone have any suggestions?

    JM

  2. #2
    Board Regular
    Join Date
    Mar 2007
    Location
    Spokane, WA
    Posts
    137
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default SOLVED - runtime error '17' - Can't perform operation

    Not sure why, but I created a new workbook and copied the module to this new book. Then removed the module from the original location. I then saved the workbook. I then copied the module back into the original workbook from the new one and -- viola! It worked.

    JM

Some videos you may like

User Tag List

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
  •