|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
在全部工作表前插入一张工作表,选中新建工作表右击,选择查看代码,输入
Sub shcopy()
Dim nrow&,r1%,rs%,ls%
R1 = 2 ‘从第二行开始复制(可修改)
Application.enableevents = false
Application.screenupdating = false
For I = 2 to sheets.count
With sheets(i)
Rs = .usedrange.rows.count + 1 - r1
Ls = .usedrange.columns.count
Arr = .range(“a” & r1).resize(rs,ls)
Range(“a65536”).end(xlup).offset(1).resize(rs,ls) = arr ‘2007版可以修改行数
End with
Next
Application.enableevents = true
Application.screenupdating = true
点击运行 |
|