View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default VBA Protect and NOT be able to selct locked cells

Look at EnableSelection in VBA's help.

brucemc wrote:

The VBA help for the protect method covers a number of items, but for
some reason, completely omits the very first two items when you use
Protect from the drop-down menus, Select Locked Cells and Select
Unlocked Cells. I specifically want to deny selecting everything except
unlocked cells (case in point: selection of locked cells) via VBA. Each
sheet have very few unlocked cells. I find I can protect via menu and
deny the locked cells, but at some point while sheets are being
unprotected and reprotected via VBA, the idiot locked cells become
selectable again. I know I must be missing something obvious here, but
I can't see it whatsoever.

How can I have VBA protect method also deny selection of locked cells?

--
brucemc
------------------------------------------------------------------------
brucemc's Profile: http://www.excelforum.com/member.php...o&userid=32871
View this thread: http://www.excelforum.com/showthread...hreadid=546080


--

Dave Peterson