在其他excel中复制整行和过去

时间:2015-11-12 14:38:28

标签: excel-vba vba excel

请告知以下编码有什么问题。我想在另一个excel中复制整行和过去,但我能够在一列而不是整行上过去。

Dim myFileNameDir1 As String
Dim ws2 As Worksheet
myFileNameDir1 = Sheet3.Range("V7").Value
Workbooks.Open fileName:=myFileNameDir1, UpdateLinks:=0
Set ws2 = Worksheets("Tracker")
str = ListView6.SelectedItem
Set match = ws1.Cells.Find(str)
With ws1
.AutoFilterMode = False
IRow1 = .Range("A" & .Rows.Count).End(xlUp).Row
With .Range("A1:A" & IRow1)
.AutoFilter Field:=1, Criteria1:=str


.Offset(1, 0).SpecialCells(xlCellTypeVisible).Copy Destination:=ws2.Range("A")

0 个答案:

没有答案