A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
You cannot paste into a locked area of a protected sheet.
Generally your macro will copy, unprotect the sheet, do the paste then reprotect the sheet.
Activesheet.unprotect password:="pword"
do the pasting
Activesheet.protect password:="pword"
As far as hidden sheets go...............you can add data to a hidden sheet just by sending it there
Assume in both cases below that Sheet2 is hidden.
Sub copy_to_hidden_sheet()
Dim rng1, rng2 As Range
Set rng1 = Sheets("Sheet1").Range("A1:F23")
Set rng2 = Sheets("Sheet2").Cells(Rows.Count, 1).End(xlUp) _
.Offset(1, 0)
rng1.Copy Destination:=rng2
End Sub
Or by this method
Sub value_only()
Dim rng1, rng2 As Range
Set rng1 = Sheets("Sheet1").Range("A1").EntireRow
Set rng2 = Sheets("Sheet2").Cells(Rows.Count, 1).End(xlUp) _
.Offset(1, 0).EntireRow
rng2.Value = rng1.Value
End Sub
Gord