password protecting with default unlocked cells only

D

Db1712

Is there a way to insure that when password protecting a sheet i
defaults to selecting unlocked cells only. I'm using a marco on
protected sheet and sometimes it protects with selecting both locke
and unlocked cells.

ActiveSheet.Unprotect ("password")

Other Macro

ActiveSheet.Protect ("password")

Thanks for any help with thi
 
R

Rojee

select for the cell/s that you wish to unlocked,
Format cells...
select protections ... check locked if you wish to locked
the cell... remove check marked if you wish to unlocked
cell
 
D

Dave Peterson

You can include another line:

With ActiveSheet
.Protect Password:="password"
.EnableSelection = xlUnlockedCells
End With
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top