我有一个工作复制和粘贴脚本,但他们复制并粘贴图片。我相当肯定它是这样做的,因为图片链接到细胞大小和移动。我想要做的仍然是复制单元格(它们的值),但没有链接到单元格的图片。这也需要在Windows和OS X上运行。
#ffcc00
Dim Section As Long, NextRow As Long
Dim FATPMetiPath As String, FATPMetiFolderPath As String
Sheets("Results").Activate
Range("Results").Select
Selection.AutoFilter
Range("Results").ClearContents
For Section = 1 To 8 '32
NextRow = Sheets("Results").Range("A" & Rows.Count).End(xlUp).Row + 1 'Next empty row
Sheets("Function Test Procedure").Select
Range("FTPSec" & Section).Columns("A:N").Copy _
Destination:=Sheets("Results").Range("A" & NextRow)
Next Section
答案 0 :(得分:2)
更改Range("FTPSec" & Section).Columns("A:N").Copy _
Destination:=Sheets("Results").Range("A" & NextRow)
致:
Dim TotalRows As Long
TotalRows = Range("FTPSec" & Section).Rows.Count
Sheets("Results").Range("A" & NextRow).Resize(TotalRows,14).Value = Range("FTPSec" & Section).Columns("A:N").Value
写这个(替换代码中的最后4行):
wsFail.Range("A" & NextRow).Value = rngCopy.Value
wsFail.Range("H" & NextRow).Value = rngCopyNotes.Value
wsFail.Range("C" & NextRow).Value = rngCopyFRResults.Value
wsFail.Range("D" & NextRow).Value = rngCopyFRResults2.Value