Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 123
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 212
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I lock specific cells w/o having to protect entire sheet? J. Becker Excel Worksheet Functions 3 June 28th 09 02:13 AM
need to lock 5 cells but not protect entire sheet Lock MY Cells Excel Discussion (Misc queries) 2 September 6th 07 07:14 PM
How do I lock/protect cells so they can't be changed Julie Excel Worksheet Functions 3 November 4th 06 03:49 AM
Can I use the grouping and lock and protect cells bfisher Excel Discussion (Misc queries) 1 January 11th 05 10:55 PM
Lock & Protect Cells With Data Paul Black Excel Programming 1 November 9th 04 12:27 PM


All times are GMT +1. The time now is 06:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"