Hello
Sub DrawGraph6(ByVal i As Long)
Dim ws1 As Worksheet, ws2 As Worksheet, ws3 As Worksheet
Dim wb As Workbook
Dim flg As Long
For Each wb In Workbooks
If wb.Name <> ThisWorkbook.Name Then
If Left(wb.Name, 3) = "amc" Then
Call GetExcelDataWorkBook6(ws1, ws2, ws3, wb, flg)
ThisWorkbook.Worksheets("Main").Range("A60").Value = ws1.Name
ThisWorkbook.Worksheets("Main").Range("B60").Value = ws2.Name
ThisWorkbook.Worksheets("Main").Range("C60").Value = ws3.Name
ThisWorkbook.Worksheets("Main").Range("D60").Value = wb.Name
If flg >= 3 Then
Call MakeGraph6(i, ws1, ws2, ws3)
End If
End If
End If
Next wb
End Sub