|
サンプル
-----------------------------------------------------------
Else
ThisWorkbook.Sheets("プリンタ全情報").Cells.ClearContents
i = 2
Set myWS = ThisWorkbook.Sheets("プリンタ全情報")
Do While myFile <> ""
Set tgWB = Workbooks.Open(myPath & myFile)
Set tgWS = tgWB.Sheets("プリンタ")
myWS.Cells(i, 1).Value = tgWS.Cells(2, 2).Value & tgWS.Cells(2, 3).Value
For j = 2 To 4
myWS.Cells(i, j).Value = tgWS.Cells(j + 2, 4).Value
Next j
i = i + 1
tgWB.Close: Set tgWB = Nothing
Set tgWS = Nothing
myFile = Dir()
Loop
Set myWS = Nothing
End If
|
|