I searched on the forum for a while but didnt find the solution.
I am looping a copy paste process to copy paste cells 100 by 100 in Excel.
To do so I use variables (la and lb) in my Range function, which increase at each loop.
But my syntax must be wrong and I can t get it work. I just find solutions concerning a single cell but never an entire range......
Code: Select all
oExcel.Range("C la :D lb ").Copy
The code is woking without the loop and the variable.
Rest of the code
Code: Select all
WinActivate, Microsoft Excel - ZIPCODE
oExcel := ComObjActive("Excel.Application") ; Automating Excel Application object
;STARTING COPY PASTE PROCESS
j := 1 ; initialization of a counter
la := 66
Loop, 3
{
lb := la + 100
WinActivate, Microsoft Excel - ZIPCODE
oExcel.Range("C%la%:D%lb%").Copy ; sTORING copied zipcodes into zipcodes variable
;I dont display the rest of my work
}