Limiting a worksheet's selection range.
It seems that it's related to what you can choose to display (Locked cells,
unlocked cells) when you protect the worksheet. I generally allow a display
of unlocked cells only and that may be why we are seeing a disconnect.
try replacing the PROTECT (for the worksheet) with this. I'm not sure it
will work
.Protect UserInterfaceOnly:=True
"Ken Johnson" wrote:
On Apr 19, 10:38 pm, Barb Reinhardt
wrote:
I used exactly the code I posted in a workbook here and it worked fine. Do
you have it in a separate module?
Hi Barb,
the code is in a standard module in that workbook.
I've tried it again by just pasting the code I last posted into a
standard module of a new workbook (Book 1).
I ran the code from sheet 1 saving it to the desktop as testing.xls.
The cells A1, B2 and C3 are the only selectable cells, as expected.
I then exited Excel, then re-opened testing.xls from the destop.
Locked and unlocked cells on sheet 1 can all be selected, not as
expected.
Do you get the same result?
Ken Johnson
|