runtime error '17' - Can't perform operation

jmattus

Board Regular
Joined
Mar 2, 2007
Messages
137
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
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
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
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,550
Members
449,088
Latest member
davidcom

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