Hello,
New VBA user..
I have created code to copy a worksheet multiple times and rename based on a list in excel. However, I am receiving an error on the ActiveSheet.Name=Sheets.... line. Please help. This is my code.
Sub CopySheet()
Dim i As Long, LastRow As Long, ws As Worksheet
Sheets("Master").Activate
LastRow = Cells(Rows.Count, 1).End(xlUp).Row
For i = 1 To LastRow
Sheets("Master").Copy After:=Sheets(i)
ActiveSheet.Name = Sheets("Dates").Cells(i, 1)
Next i
End Sub
System Configuration: Windows / Chrome 84.0.4147.89