Copy & pasting from one active sheet into another
Hi,
I am trying to create a macro that allows me, in loops, to select a cell in one active worksheet, activate another worksheet and paste it in, then going through the process x number of times in the loop.
However, all that happens is that it seems to copy and paste from the 2nd active spreadsheet and not from the first. My code is below, and I am a newbie but if anyone could help it would be greatly appreciated.
Private Sub CommandButton2_Click()
Windows("NAme1").Activate
Dim i As Integer, j As Integer
i = 109
j = 109
Do While i < 110 And j < 110
Range(Cells(i, 6)).Select
ActiveSheet.Copy
i = i + 1
Do While j < 110
Windows("CF loader.xlsm").Activate
Cells(j, 3).Select
ActiveSheet.Paste
j = j + 1
Loop
Loop
End Sub
Thanks for any help
A
Recent comments
5 years 45 weeks ago
6 years 31 weeks ago
6 years 43 weeks ago
6 years 46 weeks ago
6 years 47 weeks ago
7 years 6 days ago
7 years 8 weeks ago
7 years 9 weeks ago
7 years 9 weeks ago
7 years 9 weeks ago