VBA FOR EXCEL 问题请教,ONLINE WAITING# Database - 数据库
t*n
1 楼
我想COPY WORKBOOK1(WB1)的很多行到 WORKBOOK2(WB2) 上, 请问下面的 CODE 为什么
总有问题, rowD is the row index number. maxrD is the number of rows which will
be copied and pasted. Thank you.
**************************************************************
For rowD=1 to maxrD
wb1.Activesheet.Rows(rowD).Copy
wb2.Activate
ActiveSheet.Cells(rowD+1, 1).Paste
next rowD
总有问题, rowD is the row index number. maxrD is the number of rows which will
be copied and pasted. Thank you.
**************************************************************
For rowD=1 to maxrD
wb1.Activesheet.Rows(rowD).Copy
wb2.Activate
ActiveSheet.Cells(rowD+1, 1).Paste
next rowD