LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default lock cells until one cell is filled


In the Worksheet's code area put in:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If [a1].Value = Empty Then
Cells.Locked = True
[a1].Locked = False
ActiveSheet.Protect password:="whatever"
Else
ActiveSheet.Unprotect password:="whatever"
End If
End Sub

Change the password to something meaningful, change a1's to whichever
cell you want the initial data in, uncheck the Locked property of the
cell, protect the worksheet and hey presto!


--
colofnature
------------------------------------------------------------------------
colofnature's Profile: http://www.excelforum.com/member.php...o&userid=34356
View this thread: http://www.excelforum.com/showthread...hreadid=544785

 
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
Leaving a total sum cell blank until other cells are filled Ric Crombie Excel Worksheet Functions 3 December 8th 09 02:29 PM
To lock a cell/cells after entering the value The learner Excel Discussion (Misc queries) 1 January 27th 08 10:46 AM
Fill cells below until next cell is filled JKeef Excel Worksheet Functions 1 December 20th 07 09:55 PM
Filled cells dont appear as filled SMILLS Excel Discussion (Misc queries) 6 October 18th 07 05:28 PM
Macro Request: Fill in empty cells with previous Filled cell in column Artis Excel Worksheet Functions 2 June 25th 07 08:30 PM


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

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"