|
何度もすみません・・。
Sub sample()
Dim myPath As String
Dim myFile As String
Dim target As Range
On Error Resume Next
myPath = ThisWorkbook.Path & "\"
Application.Calculation = xlCalculationManual
Application.ScreenUpdating = False
myFile = Dir(myPath & "*.xlsx")
Do Until myFile = ""
If myFile <> ThisWorkbook.Name Then
Set target = ThisWorkbook.Worksheets("全集計").Cells(1, Columns.Count)
With Workbooks.Open(Filename:=myPath & myFile)
.Worksheets("集計").Range("a1:b30").Copy Destination:=target.Offset(0, 1)
.pastspecial Paste:=xlPasteValues
Application.CutCopyMode = False
.Close savechanges:=False
End With
End If
myFile = Dir()
Loop
End Sub
▼マナ さん:
>▼mkmk さん:
>
>>ただ、やはり貼付先の集計FILE SHEET全集計には貼りつきません。
>
>現在のコードを、もう一度、ここに貼り付けてください。
|
|