Protect Sheet - excluding selected cells

Bebbspoke

Board Regular
Joined
Oct 10, 2014
Messages
193
Hi Peoples,
I have a single sheet .xlsm which I wish to distribute... where users can ONLY modify a few specific cells... but they cannot access the formulae or macros which operate on the cells.
I have followed all "instructions" as found via Microsoft Office etc. but always end up with either a totally protected (locked) sheet or a sheet that is fully unlocked...
Please could someone fully detail the process sequence... including the "select" action on the Protection tab which at times appears to be tri-state
(i.e. blank, filled or ticked).
Thank you.
 
Hi Declamatory; - seems I'm still getting it wrong... I used the code mod as your post #10 suggested... but this runs as "single shot" (i.e. runs ONCE only) and then the macro facility is again inhibited until pw is entered... your comments please, ty.
 
Upvote 0

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Hi Bebbspoke,

The two lines of code are to unprotect the sheet and then protect it again once the macro has run.

Therefore the code to unprotect needs to be at the beginning of the code and the line to protect the sheet needs to be the last line of the code. (just before End Sub).
 
Upvote 0
Hi Declamatory; - my sincere thanks for you patience! - my error was to insert the re-protect line in the wrong place... (I had copied your example exactly - without thinking of the remainder of the code).
I now have fully protected Sheet(s) & Workbook where Users may select their restricted operations... & the macros run but cannot be accessed.
Thank you indeed, Bebbspoke
 
Upvote 0

Forum statistics

Threads
1,223,901
Messages
6,175,277
Members
452,629
Latest member
SahilPolekar

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