• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Keeping a cell locked after putting a figure in it

odartey

Member
Hello all,

I am developing a data entry system and i want it such that when the user types a complete record,that record gets locked and can be changed by only passing an adjustment in the next available row.

I have taken care of the adjustment and i want help with the locking of the record especially the column that contains the figure, in this eg columnE


ColumnA ColomnB ColumnC ColumnD ColumnE

Date Item PV# Chq# Amount

7/7/13 Transport 009 006712 450


Help will be very much appreciated

Odartey
 
Hi, odartey!

If I don't remember wrong this question has been posed many times at these forums,so if f you haven't performed yet the search herein, try going to the topmost right zone of this page (Custom Search), type the keywords used in Tags field when creating the topic or other proper words and press Search button. You'd retrieve many links from this website, like the following one(s) -if any posted below-, maybe you find useful information and even the solution. If not please advise so as people who read it could get back to you as soon as possible.

Regards!
 
Thanks SirJB7.

This is what i got and it has been helpful so far,

Private Sub Worksheet_Change(ByVal Target As Range)

Me.Unprotect "MyPass" 'Delete this last bit if no password used

Target.Locked = True

Me.Protect "MyPass" 'Delete this last bit if no password used

End Sub

but then i want ask if the code can be restricted to lock not the entire record but the value in that record


Thanks
 
Goodday odartey


Try trhis


1.Select the entire worksheet by clicking the Select All button (the gray rectangle directly above the row number for row 1 and to the left of column letter A).


2.Click Cells on the Format menu, click the Protection tab, and then clear the Locked check box.


This unlocks all the cells on the worksheet,


3.Select just the cells you want to lock and repeat step 2, but this time select the Locked check box.


4.On the Tools menu, point to Protection, click Protect Sheet, and then click OK.


Note If the Cells command is not available, parts of the worksheet may already be locked. On the Tools menu, point to Protection, and then click Unprotect Sheet.
 
Hello bobhc,

Thanks.I have tried want you suggested, but when i run the code all cells get locked

ColumnA ColomnB ColumnC ColumnD ColumnE

Date Item PV# Chq# Amount

7/7/13 Transport 009 006712 450

As per my sample data above, what i want to achieve is to make columnA:ColumnD editable and keep ColumnE locked after entry with the code that i have tried


Thanks
 
Back
Top