Here is my complete code
Filepath = ("filepath on my computer\")
n = ws.Range("car").Count
m = ws.Range("type").Count
p = ws.Range("reg").Count
j = 1
i = 1
k = 1
For j = 1 To n
For i = 1 To m
For k = 1 To p
cr = ws.Range("car").Cells(j, 1)
ty = ws.Range("type").Cells(i, 1)
rg = ws.Range("reg").Cells(k, 1)
file2 = ("\ABC-123-" & rg & "-" & ty & "-" & cr & "-CHECK.xlsm")
On Error GoTo Skipme
Workbooks.Open (Filepath & file2)
ActiveWorkbook.Worksheets("CarInfo").Visible = True
ActiveWorkbook.Worksheets("CarInfo").Select
ActiveWorkbook.Worksheets("CarInfo").Range("F1:F87").Select
Application.CommandBars.FindControl(ID:=398).Execute
Application.CommandBars.FindControl(ID:=398).Execute
Selection.Copy
ActiveWorkbook.Close (False)
ActiveSheet.Cells(1 + (i + (n + 2) * (j - 1)), 2).Select
Selection.PasteSpecial
clipboard.Clear
skipme:
Next k
clipboard.Clear
Next i
clipboard.Clear
Next j
End Sub
Bookmarks