Password protecting a sheet, while allowing vba to freely unprotect

Yeoman.jeremy

Board Regular
Joined
Apr 4, 2011
Messages
90
Hi there.

I have recently encountered a problem with my excel program, in which the manager of a particular shop is being very sour about change, and it is my impression that he is purposefully unprotecting and protecting the sheet again after mucking around with little bits of formulae.

I know that I can use a password to prevent people other than myself to unprotect the sheet, but this isn't ideal, as my vba coding requires the unprotecting and protecting of the sheet. is there a way that i can get around having to type in the password everytime i use a piece of code?

Many thanks
 
ah i see.
I tried to reference the entire workbook, but when i changed to reference just the one sheet it stepped through it fine.

many thanks!
 
Upvote 0

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

Forum statistics

Threads
1,216,000
Messages
6,128,204
Members
449,435
Latest member
Jahmia0616

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