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 36 weeks ago
6 years 22 weeks ago
6 years 34 weeks ago
6 years 37 weeks ago
6 years 38 weeks ago
6 years 43 weeks ago
6 years 52 weeks ago
7 years 2 days ago
7 years 3 days ago
7 years 3 days ago