insert a row with enter on a specific cell
Hi Oakie
My mistake.
If you choose the second option, you'll need this code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim myValue
If Target.Row = 3 And _
Target.Borders(xlEdgeBottom).LineStyle = xlContinuous Then
Application.EnableEvents = False
ActiveSheet.Unprotect "mypassword"
Target.Borders(xlEdgeBottom).LineStyle = xlNone
With Target.Offset(1, 0)
.Borders(xlEdgeLeft).LineStyle = xlContinuous
.Borders(xlEdgeRight).LineStyle = xlContinuous
.Borders(xlEdgeBottom).LineStyle = xlContinuous
.Locked = False 'unlock the new cell
End With
ActiveSheet.Protect "mypassword"
Application.EnableEvents = True
End If
End Sub
This will unlock the new cell for use. Also note where you can input a
password to make the sheet a little more secure.
Regards
Steve
|