![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Posts: 17
|
I have a worksheet with a lot of information on it. Several places there are areas for 'user' input. I used conditional formatting and cell validation to restrict input. I also unlocked those cells and protected the rest of the worksheet.
I would like to make it impossible for the 'user' to select the locked cells. Is this possible? Even when the worksheet is protected, the cells which are locked, can still be selected. I want only the unlocked cells able to be selected. I would also like to hide the toolbars when the sheet is protected. Any ideas? Thanks for the help. |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Helena, MT
Posts: 13,690
|
Use this code in the Worksheet Module
Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Locked=True Then Range("$A$1").Select End Sub [ This Message was edited by: lenze on 2002-05-01 06:54 ] |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Feb 2002
Location: Ahmedabad Gujarat
Posts: 303
|
may you can work this way around in selection change event..
dim currentrange as range set currentrange = activecell if targetcell.locked = true then currentrange.select |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|