With ThisWorkbook.Sheets("Chart-F")
Set B = Intersect(.UsedRange, .Range("A:D")).SpecialCells(xlCellTypeVisible)
Windows("2011 BCMart Multi-Format.xlsx").Activate
Sheets("Factory's order").Select
B.Copy .Range("A1") '完全複製
End With
With ThisWorkbook.Sheets("Chart-F")
Set B = Intersect(.UsedRange, .Range("A:D")).SpecialCells(xlCellTypeVisible)
B.Copy Workbooks("2011 BCMart Multi-Format.xlsx").Sheets("Factory's order").Range("A1") '完全複製
End With作者: PJChen 時間: 2012-1-20 21:58
Dear,
我想要複製資料時,完全複製後貼上值,可是執行到選擇性貼上值就失敗了,請問哪裡出錯了?[attach]9292[/attach]
With ThisWorkbook.Sheets("Chart-F")
Set B = Intersect(.UsedRange, .Range("A:D")).SpecialCells(xlCellTypeVisible)
B.Copy Workbooks("2011 BCMart Multi-Format.xlsx").Sheets("Factory's order").Range("A1") '完全複製
B.Copy Workbooks("2011 BCMart Multi-Format.xlsx").Sheets("Factory's order").Range("A1").PasteSpecial xlPasteValues '選擇性貼上值,失敗了
版大,我找到原因了,這個表已經ok. 謝謝你.
With Workbooks("Chart-F.xlsx").Sheets("工作表1")
Set B = Intersect(.UsedRange, .Range("A:D")).SpecialCells(xlCellTypeVisible)
Workbooks("2011 BCMart Multi-Format.xlsx").Activate
Sheets("Factory's order").Select
Range("A1").Select
B.Copy
Selection.PasteSpecial xlPasteValues '選擇性貼上值
End With