0
votes

I want to have a protected sheet while not allowing to select locked cells (only range that I want to format) while allowing a change of format of range("B22:M46"). Only the format

In other words, there will be a range where you can change only format of cells and all the other cells will be locked and user will not be able to select these cells.

I know how to protect sheet, how to unlock range and even how to enable selection, but I can't put it all together

Is this even possible? Thank you

1
have you tried the userinterfaceonly property on protect? "True to protect the user interface, but not macros. If this argument is omitted, protection applies both to macros and to the user interface"Nathan_Sav

1 Answers

0
votes

A quick look at the interface, using the recorder gave me an answer:

With mySheet
    .Protect ...., AllowFormattingCells:=True
    .EnableSelection = xlUnlockedCells
End With