Hi, ajryan88,
maybe use
to save the workbook after manipulating. Any reason why LastRow is Long and i only Integer?
Private Sub CommandButton1_Click()
Dim lastRow As Long
Dim i As Long
Dim WB As Workbook
On Error Resume Next
For i = 3 To Range("D" & Rows.Count).End(xlUp).Row
Set WB = Workbooks.Open(Cells(i, "D").Value & "\" & Cells(i, "C").Value)
If Not WB Is Nothing Then
'Call your macro here. If need be, use WB to refer to the new workbook
WB.Close True
Else
MsgBox "Please check path & forlder for Row " & i, vbExclamation
Exit Sub
End If
Next i
Set WB = Nothing
End Sub
Bookmarks