When my worksheet is unprotected, my macro works perfectly, however after I protect it (and even though the cells affected by the macro are unlocked), I get the following error:
Run-time error '1004':
Unable to set the NumberFormat property of the Range class
When I click on debug, it shoots me to a portion of my VBA code highlighted in yellow:
Does anyone have any idea what is causing this? I should note that the macro still technically does what it is supposed to when the sheet is protected, its just that I also get the error pop-up.![]()
Please Login or Register to view this content.
Bookmarks