我期待循环可以从主数据列逐个复制值,应用于链接到我的数据库的单元格,刷新数据库,复制链接到数据库的表格中的值&然后将它们累积在一张纸上。
以下是两组程序的宏录制的简单代码,我想在主数据列中重复这一到空白值。
Sheets("Base Summary").Select
Range("T3:W3").Select
Selection.Copy
Range("B4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
ActiveWorkbook.RefreshAll
Range("B3:R6").Select
Range("R6").Activate
Selection.Copy
Sheets("Summary").Select
Range("E1048576").Select
Selection.End(xlUp).Select
ActiveCell.Offset(1, -4).Activate
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Base Summary").Select
Range("T4:W4").Select
Selection.Copy
Range("B4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
ActiveWorkbook.RefreshAll
Range("B3:R6").Select
Range("R6").Activate
Selection.Copy
Sheets("Summary").Select
Range("E1048576").Select
Selection.End(xlUp).Select
ActiveCell.Offset(1, -4).Activate
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False