Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Locking Cell Once Data is entered

Yes.

Give us more details of what you want locked or adjust this example sheet event
code.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
On Error GoTo enditall
Application.EnableEvents = False
If Target.Cells.Column = 1 Then
ActiveSheet.Unprotect Password:="justme"
n = Target.Row
If Target.Value < "" Then
Target.Locked = True
End If
End If
enditall:
Application.EnableEvents = True
ActiveSheet.Protect Password:="justme"
End Sub

You will have to set cells of column A to unlocked then protect the sheet.

Right-click on the sheet tab and "View Code"

Copy/paste the code into that module.


Gord Dibben MS Excel MVP

On Wed, 28 Nov 2007 08:15:00 -0800, Wm Pincumbe <Wm
wrote:

Is there a way to lock a cell from being changed once data has been entered
into that cell?


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
LOCK CELL AFTER DATA IS ENTERED MIke Excel Discussion (Misc queries) 4 October 24th 07 12:33 AM
Change color of cell when different cell has data entered B J G Excel Discussion (Misc queries) 1 October 18th 07 07:59 PM
Locking in Formula cell to follow its cells that contain calc data Jason52 Excel Discussion (Misc queries) 1 April 13th 07 07:08 PM
How do I prevent data from being entered into a particular cell? Bryan Excel Discussion (Misc queries) 1 April 7th 07 01:24 AM
data changes when entered into a cell Ian Gill Excel Worksheet Functions 1 October 10th 06 05:39 PM


All times are GMT +1. The time now is 07:45 AM.

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

About Us

"It's about Microsoft Excel"