Archive of Mr Excel Message Board
Back to Forms in Excel VBA archive index
Back to archive home
Formatting certain cells to read onlyPosted by CJ on January 04, 2002 6:18 AM
Is there a way of locking certain cells in a spreadsheet so as they cannot be altered and they are read only?
Re: Formatting certain cells to read onlyPosted by Scott on January 04, 2002 6:35 AM
If you format the cells as locked Format-Cells and then on the Protection Tab, select "Locked". Then when you protect the sheet: Tools-Protection-Protect Sheet, These cells will be locked. You may want to make sure any cells that you want the user to have access to are NOT locked when you protect the sheet.
Re: Formatting certain cells to read onlyPosted by lenze on January 04, 2002 6:44 AM
Another way you can do this is through Data Validation. After you have a cell populated with the desired contents, Choose Data Validation and use the Custom option. For the formula enter =""
This will prevent someone from entering data in the cell and does not require the sheet to be protected. This can be particularly useful if you have macros that require the sheet to be unprotected to run
This archive is from the original message board at www.MrExcel.com.
All contents © 1998-2004 MrExcel.com.
Visit our online store
to buy searchable CD's with thousands of VBA and Excel answers.
Microsoft Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.