Protect Sheet after an entry.

  • Thread starter Thread starter gisro
  • Start date Start date
G

gisro

I have created a macro that allows users to enter specific info at the
beginning with a form. When they click on OK, the sheet is protected
but a specific range of cells is unlocked so that they can paste
specific data from another program. I want the entire sheet to become
protected (or to lock the cells again) as soon as the user pastes this
values to a cell. How can I do this?

Thanks
 
In a Worksheet_Change event you can simply use Me.Protect. Right-click the
sheet tab, select View Code, enter this:

Private Sub Worksheet_Change(ByVal Target As Range)
Me.Protect
End Sub
 
Thanks but it doesn´t. Now it doesn´t let me add any data anywhere. I´m
attaching the macro so you can see what it does.
What I want is that after we insert the text from the form, the user
can paste other data starting in A17 an d as soon as this happens the
macro is protected.
Thanks again.

File Attached: http://www.exceltip.com/forum/attachment.php?postid=309656 (macrotelmex.zip)
 
Back
Top