• 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.

Lock a cell containing data validation post selection of result

Vipullade

Member
I have a file which has data validation in a column, the values are from 1-5, post the user selecting any one number the cell should get locked, please assist with this.
 

Attachments

  • Test version 1.0.xlsm
    28.4 KB · Views: 2
Hi ,

Please upload a file which is not protected ; otherwise , post the password for the worksheet protection.

Narayan
 
Hi ,

See the attached file. The first entry is already locked.

Narayan
 

Attachments

  • Test version 1.0.xlsm
    27.9 KB · Views: 6
I need to use this sheet multiple times, which means I would have to unlock the cells every time It is to be given to the user
Am I correct on this
 
That would be a great help, I am myself learnihng VBA but still in a very nascent stage....Really appreciate yout help
 
Hi ,

See the attached file.

You will have to run the macro named ResetLocks.

Note that both macros make use of a named range called DataEntryCells.

Narayan
 

Attachments

  • Test version 1.0.xlsm
    27.7 KB · Views: 2
Hey Narayan, need help in this, I modified the reset code to reset the cell values to "Please select", but due to this all the cells in the range are locked, i need them to be unlocked and lock only if the values are between 1-5 both inclusive..can you help please
 
Public Sub ResetLocks()
[dataentrycells].Locked = False
[dataentrycells].Value = "Please Select"
End Sub
Code for your reference
 
Sorry to be a bother but Now I need to link the locking code to a command button, can you help on this as i tried doing it but dont know what i am missing, I put an active x button and tried linking the locking code but it wont work.....Please help
 
The password is Big5@123, i have used the same code you provided narayan, in the command click sub but it is not working, i am mssing on something, but could not figure it out.. please help
 

Attachments

  • Test version 2.1.xlsm
    31.4 KB · Views: 1
what I am looking for is now that the cells remain unlocked untill the submit button is selected, once the submit button is selected, all the cells in the range f8:f106 in the test sheet should be locked
 
Back
Top