|
こんにちは
こんな感じでしょうか。^d^
Sub Books2Sheet()
Dim rngDest As Range
Dim myPath As String
Dim myBookName As String
Dim myBook As Workbook
Dim mySheet As Worksheet
myPath = ThisWorkbook.Path & "\"
myBookName = Dir(myPath & "*.xls")
If myBookName = "" Then Exit Sub
Set rngDest = Workbooks("BOOKA.xls").Range("A2")
Do While Not myBookName = ""
If myBookName = ThisWorkbook.Name Then
'nop
Else
Set myBook = Workbooks.Open(myPath & myBookName)
For Each mySheet In myBook.Worksheets
With mySheet.UsedRange
.Copy rngDest
Set rngDest = rngDest.Offset(.Rows.Count, 0)
End With
Next
myBook.Close False
End If
myBookName = Dir()
Loop
End Sub
|
|