|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
本帖最后由 LMY123 于 2014-12-22 22:09 编辑
Sub test()
n = 8
''' n = ActiveDocument.Tables(1).Cell(10, 2) 怎么把n=8换成这一句,也就是把n等于常量换成n等于变量
ActiveDocument.Tables(1).Cell(9, 2).Select
Selection.Copy
Selection.MoveDown Unit:=wdLine, Count:=n - 1, Extend:=wdExtend
Selection.Paste
ActiveDocument.Tables(1).Cell(9, 3).Select
Selection.Copy
Selection.MoveDown Unit:=wdLine, Count:=n - 1, Extend:=wdExtend
Selection.Paste
ActiveDocument.Tables(1).Cell(9, 4).Select
Selection.Copy
Selection.MoveDown Unit:=wdLine, Count:=n - 1, Extend:=wdExtend
Selection.Paste
ActiveDocument.Tables(1).Cell(9, 5).Select
Selection.Copy
Selection.MoveDown Unit:=wdLine, Count:=n - 1, Extend:=wdExtend
Selection.Paste
End Sub
原表.rar
(8.31 KB, 下载次数: 14)
效果表.rar
(8.34 KB, 下载次数: 14)
|
|