|
▼Jaka さん:
>こんな感じでもいいと思います。
>
>Dim WBK As Workbook
>BNst = Dir("フルパス")
>Set WBK = Workbooks.Open(BNst)
>ADR = WBK.Sheets(1).UsedRange.Address
>WBK.Sheets(1).UsedRange.Copy
>ThisWorkbook.Sheets(3).Range(ADR).PasteSpecial (xlPasteAll)
>Application.CutCopyMode = False
>WBK.Close
>Set WBK = Nothing
Dim WBK As Workbook
BNst = Dir("C:\BBB\*.xls")
Set WBK = Workbooks.Open(BNst)
ADR = WBK.Sheets(1).UsedRange.Address
WBK.Sheets(1).UsedRange.Copy
ThisWorkbook.Sheets(3).Range(ADR).PasteSpecial (xlPasteAll)
Application.CutCopyMode = False
WBK.Close
Set WBK = Nothing
でやってみたのですが、エラーになります。。。
|
|