Hello,
I am trying to copy a specific range of data from a sheet titled "Summary Template" to any worksheet that is not titled "Summary Template" or "Priority Admin" but I am continually getting an error message. Below is the code
Sub Populate()
Dim ws As Worksheet
Dim lockedsheet As Worksheet
lockedsheet = Array("Summary Template", "Priority Admin")
Dim template As Worksheets
Set template = Worksheets("Summary Template")
For Each ws In ThisWorkbook.Sheets
If Not ws.Name = lockedsheet.Name Then
template.Range("A1:Y83").Copy
ws.Range("A2").PasteSpecial (xlPasteAll)
End If
Next ws
End Sub
Please help
I am trying to copy a specific range of data from a sheet titled "Summary Template" to any worksheet that is not titled "Summary Template" or "Priority Admin" but I am continually getting an error message. Below is the code
Sub Populate()
Dim ws As Worksheet
Dim lockedsheet As Worksheet
lockedsheet = Array("Summary Template", "Priority Admin")
Dim template As Worksheets
Set template = Worksheets("Summary Template")
For Each ws In ThisWorkbook.Sheets
If Not ws.Name = lockedsheet.Name Then
template.Range("A1:Y83").Copy
ws.Range("A2").PasteSpecial (xlPasteAll)
End If
Next ws
End Sub
Please help