Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Lock and protect cells without protect the sheet
Dear experts,
I would like lock and protect cells without protect the sheet. Thank You Christian |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Lock and protect cells without protect the sheet
Hi Christian
not possible. But why do you want to do this anayway?. "Christian" wrote: Dear experts, I would like lock and protect cells without protect the sheet. Thank You Christian |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Lock and protect cells without protect the sheet
Hi Christian,
Whilst the locked property of the cells can be set, the locking (and protection) is only activated when the sheet is protected. What are you trying to do exactly? --- Regards, Norman "Christian" wrote in message .. . Dear experts, I would like lock and protect cells without protect the sheet. Thank You Christian |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Lock and protect cells without protect the sheet
Not possible as such.
If you want to protect the cells from users i.e. ser manually should not be able to change the cell values or any other properties then you can add a code in that sheet's Selection Change. By default all the cells in the worksheet are locked, but not formuala hidden. For the cells which you want to protect (from the users), go to Format Cells and on Protection Tab check the box 'Hidden'. Below code will not allow the user to selct cell (or a range including the cell) for which the Hidden box is checked. Private Sub Worksheet_SelectionChange(ByVal Target As Range) Dim c Application.EnableCancelKey = xlDisabled For Each c In Target.Cells If c.FormulaHidden Then c.Offset(0, 1).Select MsgBox "The cell left to the now selected cell" _ & "is protected and you can't select it." Exit For End If Next c Application.EnableCancelKey = xlInterrupt End Sub If you yourself want to change back the hidden box to unchcecked enter in design mode first then you can change (and mind you, so can a user if he knows enough!) Sharad *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Lock and protect cells without protect the sheet
actually, it IS possible.
Go to the IDE, and in the Project Viewer, select the sheet that you want to portect. Select the Properties Window and you'll see a proprty called "ScrollArea" This is the range that the cursor can move in. Usually left blank, but you could setthis to a cell, like A1 or A1:G5 the effect limits where the user can select....so your data can only be seen and th eformula remains hidden... and obviously a cell cannot be changed if it cannot be selected ! Not widely used, but its a good way to "protect" data. "Christian" wrote: Dear experts, I would like lock and protect cells without protect the sheet. Thank You Christian |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Lock and protect cells without protect the sheet
Wow! That's so simple!
Though this can not be assigned to non continuous range, I don't know if the OP can use this but I found it very useful, in many of my templates, I need to give the user access only to a certain (continuous) range. And with what you told, even if the user goes to design mode, it still work! Thanks Sharad "Patrick Molloy" wrote in message ... actually, it IS possible. Go to the IDE, and in the Project Viewer, select the sheet that you want to portect. Select the Properties Window and you'll see a proprty called "ScrollArea" This is the range that the cursor can move in. Usually left blank, but you could setthis to a cell, like A1 or A1:G5 the effect limits where the user can select....so your data can only be seen and th eformula remains hidden... and obviously a cell cannot be changed if it cannot be selected ! Not widely used, but its a good way to "protect" data. "Christian" wrote: Dear experts, I would like lock and protect cells without protect the sheet. Thank You Christian |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Lock and protect cells without protect the sheet
"Sharad Naik" ha scritto nel messaggio ... Wow! That's so simple! Though this can not be assigned to non continuous range, I don't know if the OP can use this but I found it very useful, in many of my templates, I need to give the user access only to a certain (continuous) range. And with what you told, even if the user goes to design mode, it still work! Thanks Sharad "Patrick Molloy" wrote in message ... actually, it IS possible. Go to the IDE, and in the Project Viewer, select the sheet that you want to portect. Select the Properties Window and you'll see a proprty called "ScrollArea" This is the range that the cursor can move in. Usually left blank, but you could setthis to a cell, like A1 or A1:G5 the effect limits where the user can select....so your data can only be seen and th eformula remains hidden... and obviously a cell cannot be changed if it cannot be selected ! Not widely used, but its a good way to "protect" data. "Christian" wrote: Dear experts, I would like lock and protect cells without protect the sheet. Thank You Christian Thank You, Christian |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can I lock specific cells w/o having to protect entire sheet? | Excel Worksheet Functions | |||
need to lock 5 cells but not protect entire sheet | Excel Discussion (Misc queries) | |||
How do I lock/protect cells so they can't be changed | Excel Worksheet Functions | |||
Can I use the grouping and lock and protect cells | Excel Discussion (Misc queries) | |||
Lock & Protect Cells With Data | Excel Programming |