|
こんにちは
こんな感じで出来ますでしょうか?
Sub 統合()
Dim i As Long
Dim s As String
Dim lstR As Long
Dim w As Long
Dim wBK As Workbook
Application.ScreenUpdating = False
With Workbooks("統合.xls").Sheets("Sheet1")
.UsedRange.Offset(1).Clear
lstR = 2
For i = 1 To 10
s = "売上" & Format(i, "00")
'SLKファイルの有るフォルダへのパス、要変更
Set wBK = Workbooks.Open( _
FileName:="\\・・・\・・・\・・・\" & s & ".SLK")
wBK.Worksheets(s) _
.UsedRange.Offset(1).Copy .Cells(lstR, 1)
w = .Range("A65536").End(xlUp).Row
.Range(.Cells(lstR, "N"), .Cells(w, "N")).Value = Val(Mid(s, 3))
lstR = w + 1
wBK.Close
Next
.UsedRange.Offset(1).NumberFormatLocal = "G/標準"
End With
Application.ScreenUpdating = True
End Sub
|
|