Thanks Thanks:  0
Likes Likes:  0
Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Cell Protection

  1. #1
    New Member
    Join Date
    May 2002
    Posts
    17
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    How can i lock a cell without the complication of adding user permissions as this wont be avaliable when i take my assignment into college?



  2. #2
    MrExcel MVP
    Join Date
    Apr 2002
    Location
    Vancouver BC , Canada
    Posts
    6,259
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Locking and Hiding cells is done through : right click on cell... format... protection tab.
    By default all cells have lock checked. Uncheck if you do not want protected.

    Now go to toolbar and select ... tools.. protection ... protect sheet

  3. #3
    New Member
    Join Date
    May 2002
    Posts
    17
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Ah yes but there are certain cells that i want to remain active and editable! By protecting the worksheet, it means they cannot edit anything!

    I only want to protect certain cells

  4. #4
    Board Regular
    Join Date
    Feb 2002
    Location
    Huntington Beach, CA USA
    Posts
    327
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Re-Read Nimrods post!

    James

  5. #5
    New Member
    Join Date
    May 2002
    Posts
    17
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Ah feck, im not with it today i really aint!

    *puts his head in a bucket of water and holds for 10 mins*

  6. #6
    New Member
    Join Date
    May 2002
    Posts
    17
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Ok, new problem because the cells are protected my macro button doesnt work anymore!!! ARGH!!! (i hate spreadsheets)

    The macro sorts the data in the cells but when i try to run it by clicking the button, i get a run-time error doh!!!!

  7. #7
    Board Regular
    Join Date
    Feb 2002
    Location
    Huntington Beach, CA USA
    Posts
    327
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Private Sub CommandButton1_Click()
    With Selection
    Sheets("YOUR SHEET NAME HERE").Unprotect password:="YOUR PASSWORD"
    YOUR CODE HERE
    End With
    Sheets("YOUR SHEET NAME HERE").Protect
    password:="YOUR PASSWORD"
    End Sub

    James

    _________________


    [ This Message was edited by: James on 2002-05-08 11:30 ]

  8. #8
    New Member
    Join Date
    May 2002
    Posts
    17
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    hmmm... now it says that it doesnt support this method and highlights this pices of code

    Sheets("100m").UnProtect_password = "whatever"

    [ This Message was edited by: lukemedway on 2002-05-08 11:30 ]

  9. #9
    MrExcel MVP
    Join Date
    Apr 2002
    Location
    Vancouver BC , Canada
    Posts
    6,259
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I usually don't bother with a password when protecting the sheets. After all we're just trying to prevent any changes by mistake.
    Forget passwords for this stuff it's not worth the bother.

    Other then that I totally agree with James suggestion...great solution
    _________________

    NOTE: Testing performed on Win2K utilizing Office 2000. Solutions may not work on other versions.

    [ This Message was edited by: Nimrod on 2002-05-08 11:30 ]

  10. #10
    New Member
    Join Date
    May 2002
    Posts
    17
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    So if the code is set out like that

    Sheets("100m").UnProtect_password = "whatever"

    do i just remove the password bit, so i looks like this?

    Sheet(100m).Unprotect

    [ This Message was edited by: lukemedway on 2002-05-08 11:38 ]

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •