#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Locking cells

I have created a table that I only want to enter data into one row. How can I
lock the other cells so they can't be edited, by myself or others. I may in
the future want to go and edit the locked cells at a later date.
  #2   Report Post  
Posted to microsoft.public.excel.misc
bj bj is offline
external usenet poster
 
Posts: 1,397
Default Locking cells

select the row you want to be able to edit
format-cells-protection
unclick locked
select OK
Tools- protection
select protect sheet
you don't have to use a pass word, unless you think someone might play with
the document.




"Andy_Trow" wrote:

I have created a table that I only want to enter data into one row. How can I
lock the other cells so they can't be edited, by myself or others. I may in
the future want to go and edit the locked cells at a later date.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7,247
Default Locking cells

Andy,

By default, all cells are locked so when you Protect the sheet (from the
Tools menu, Protection item), all cells will be uneditable. Select the cells
you want to be able to change, go to the Format menu, choose Cells, then the
Protection tab. There, uncheck the Locked option, enter a password if
desired, and then protect the sheet. Only those cells that you unlocked will
be editable. All other cells on the sheet will be locked.

Protecting a cell prevents it from being changed by either the user or VBA
code. If you want to allow VBA code to change any cell but still keep the
user from changing a cell, leave the cell Locked but protect the sheet via
VBA code using the UserInterfaceOnly option. In the ThisWorkbook code
module, use

Private Sub Workbook_Open()
ThisWorkbook.Worksheets("SheetName").Protect UserInterfaceOnly:=True ' ,
Password:="abc" ' password if desired
End Sub

Now, VBA code can change any cell but the user is still locked out. Note
that the UserInterfaceOnly option is available only via code (there is no
menu item or command button for it) and it does not get saved with the
workbook. You must set the property whenever the workbook is opened.

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting
www.cpearson.com
(email on the web site)

"Andy_Trow" wrote in message
...
I have created a table that I only want to enter data into one row. How can
I
lock the other cells so they can't be edited, by myself or others. I may
in
the future want to go and edit the locked cells at a later date.


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
Locking Cells Jai Excel Discussion (Misc queries) 5 October 8th 09 01:25 PM
locking formula in cells in without locking whole sheet SuziQ Excel Discussion (Misc queries) 1 July 21st 06 03:58 PM
Locking Cells chefmike Excel Discussion (Misc queries) 6 March 15th 06 04:50 PM
Locking Cells PH NEWS Excel Worksheet Functions 3 March 3rd 06 12:31 PM
Help on locking cells B Excel Discussion (Misc queries) 1 January 28th 05 04:17 AM


All times are GMT +1. The time now is 02:57 PM.

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"