Hi,
im trying to paste some values into sheets which names are 1-12. Each of this sheets represents months of the year. Im trying the following macro
Sub wkle()
Dim i As Integer
Dim sh As Worksheet
For i = 1 To 12
ActiveSheet.Range("S46:U52").Copy
Worksheets(i).Activate
Worksheets(i).Range("S46:U52").PasteSpecial
Next i
End Sub
But Excel thinks that i is the number of the sheet and not a name. He pastes the values even if a sheet is called "input".
How to resolve it?
im trying to paste some values into sheets which names are 1-12. Each of this sheets represents months of the year. Im trying the following macro
Sub wkle()
Dim i As Integer
Dim sh As Worksheet
For i = 1 To 12
ActiveSheet.Range("S46:U52").Copy
Worksheets(i).Activate
Worksheets(i).Range("S46:U52").PasteSpecial
Next i
End Sub
But Excel thinks that i is the number of the sheet and not a name. He pastes the values even if a sheet is called "input".
How to resolve it?
Last edited: