I want to paste values into an Excel Table that is on a protected sheet.
I've put this code together which works, but only when I specify in the code where to copy from. The problem is that I want to specify what to copy before I run the code
If I just remove the line which copies the data I get a 400 error
![]()
Sub Transfer() ActiveSheet.Unprotect "" Application.ScreenUpdating = False Sheets("TR").Range("A1:A4").Copy 'When I exclude this line I get a 400 error Sheet2.Range("B" & Rows.Count).End(3)(2).PasteSpecial xlValues Application.CutCopyMode = False Application.ScreenUpdating = True ActiveSheet.Protect "" End Sub
Bookmarks