Hi,
I am using Excel 2003. I have a macro to copy and paste data, selecting from a range and pasting into a row.
One of the columns in the worksheet needs to be protected. how do I only protect and unprotect only one column (how would the coding differ?)
The coding I have is:
Sub CopyPaste()
Sheets("Existing Card Entry").Unprotect
Sheets("Existing Card Entry").Range("part").ClearContents
With Worksheets(1).Range("partdetail2")
Set c = .Find(Worksheets("Existing Cards").Range("L2").Value, LookIn:=xlValues) 'this identifies the value D11 in worksheet called Summary1
If Not c Is Nothing Then
firstAddress = c.Address
Do
c.EntireRow.Copy Destination:=Worksheets("Existing Card Entry").Range("a" & Worksheets("Existing Card Entry").Range("a65536").End(xlUp).Row + 1)
Worksheets(1).Range("partdetail2").Copy
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> firstAddress
End If
End With
Sheets("Existing Card Entry").Select
Sheets("Existing Card Entry").Protect
End Sub
Regards,
Ken