0
votes

I'm using Excel 2010 and protect using the following line in VBA:

Worksheets("GL Codes").Protect Password:="xxxxxxxxx", AllowFiltering:=True, AllowFormattingCells:=True

However, I now receive an error when I double-click to run the below:

Range("A" & Target.Row).Copy Destination:=Range("A2")

How do I protect but still allow a copy via VBA?

1

1 Answers

0
votes

Sorted it!

Just removed the 'locked' protection checkbox for cell A2