Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want set a range(one cell or more) can't be selected, so the user can't
change the values. How can I do? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim MyRange As Range
Set MyRange = Worksheets("Sheet1").Range("B3:D20") Set MyRange = Activesheet.Range("A10") Get the idea? Mike F "cherishman" wrote in message ... I want set a range(one cell or more) can't be selected, so the user can't change the values. How can I do? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can lock those cells (as well as any other cells that shouldn't be changed)
and unlock the cells that are ok to update. Format|Cells|protection tab is one way of toggling that setting. Then protect the worksheet. tools|protection|protect sheet Be aware that worksheet protection isn't a security measure--it's usually just used to keep users from overwriting formulas/labels. That worksheet protection is easily broken. And if you really want to stop the selection--not just stop the changing... If you protect the sheet in code, it'll work for xl97+ (as long as the macro runs): Option Explicit Sub auto_open() With Worksheets("sheet1") .Protect Password:="hi" .EnableSelection = xlUnlockedCells End With End Sub Excel won't remember these settings after you close it and reopen the workbook (that's why it's in auto_open). If you're new to macros, you may want to read David McRitchie's intro at: http://www.mvps.org/dmcritchie/excel/getstarted.htm cherishman wrote: I want set a range(one cell or more) can't be selected, so the user can't change the values. How can I do? -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how to add 130% to a selected range of numbers ? | Excel Discussion (Misc queries) | |||
Reclaculating a selected range | Excel Discussion (Misc queries) | |||
delete every nth row in selected range | Excel Discussion (Misc queries) | |||
Copying a selected used range | Excel Programming | |||
Box around selected range | Excel Programming |