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 34 weeks ago
6 years 20 weeks ago
6 years 32 weeks ago
6 years 35 weeks ago
6 years 36 weeks ago
6 years 42 weeks ago
6 years 50 weeks ago
6 years 50 weeks ago
6 years 50 weeks ago
6 years 50 weeks ago