Auto-lock cells in an Excel Spreadsheet?
Results 1 to 5 of 5

Thread: Auto-lock cells in an Excel Spreadsheet?

  1. #1
    Registered User
    Join Date
    Sep 2001
    Location
    6 feet under
    Posts
    500

    Post Auto-lock cells in an Excel Spreadsheet?

    Excel's never been an app I've had much use for, but I was wondering: would it be possible to set a spreadsheet up so that once data is entered into a cell, the cell auto-locks itself so that the data can not be altered without a password?

  2. #2
    Registered User
    Join Date
    Dec 2000
    Location
    Circle Pines,MN,USA
    Posts
    805

    Post

    I am not sure about each cell, but I know a sheet can do that.


    If your up for some VBS you can make a macro to lock it after editing.

    Check for if cell<>"" then Lock.

  3. #3
    Registered User
    Join Date
    Jan 2001
    Location
    Scotland
    Posts
    468

    Post

    If you don't want to VB script it, simply go Tools>Protection and lock what you want (Sheet, workbook). Password availabiltiy there.
    Then on the cells you want to, right-click, FormatCells>Protection (It tells you to do step one above!)

    Good luck

  4. #4
    Registered User Spaceman Spiff's Avatar
    Join Date
    Dec 2000
    Location
    Gig Harbor, Washington
    Posts
    1,746

    Lightbulb

    [quote]Originally posted by Lowland:
    <strong>If you don't want to VB script it, simply go Tools>Protection and lock what you want (Sheet, workbook). Password availabiltiy there.
    Then on the cells you want to, right-click, FormatCells>Protection (It tells you to do step one above!)

    Good luck</strong><hr></blockquote>

    Yeah, that's the normal way to lock a spreadsheet. You lock the cells then turn on worksheet or workbook protection. Only unlocked cells can then be altered. Keep in mind that if you do use the VBA script, many of Excel's normal functions like copy and paste don't work anymore. I had the same problem with a spreadsheet I created that used VBA drop-down list boxes to choose what went into a particular set of cells. So, the VBA script was constantly looking to see if a cell was the correct cell for the dropdown list and it overran the normal worksheet functions. I'm in the process of making the dropdown lists an add-in library file (XLA) so that I can get worksheet functionality back...
    Spaceman Spiff sets his blaster to frappé...

  5. #5
    Registered User
    Join Date
    Jan 2001
    Location
    Scotland
    Posts
    468

    Post

    Spaceman Spiff

    Just a thought!

    Have you tried using the built-in Pick From List to do your drop-down boxes? I think it's possible to hide the list at the start of a spreadsheet, then when you are in the cell you want to enter data in, right-click and choose "Pick from List"

    Anything to save macros, VBS or designing new xla's!!

    Good luck!

Bookmarks

Posting Permissions

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