I am trying to go through a list of files, but I know some of the files will not have a correct file path. When I run it if it isn't a correct path it brings up a file folder. Is there a way to make it so if it does open a file folder it closes it and goes to next without me having to cancel it? Here is the current code I have now:

Sub AverageWash()
    Dim c As Range
    Dim path As String
    path = Worksheets("Legend").Range("I3")
    Sheets("AverageWash").Visible = True
    Sheets("AverageWash").Activate
    Call GetFileDetailsAW
    For Each c In Range("A3", Cells(Rows.count, "A").End(xlUp))
        c.Offset(0, 8).Formula = "='" & path & "[" & c.Value & "]" & "Setup'!$P$14"
       'be able to go to next c if the path doesn't exist
    Next c
    Call AverageWash2
End Sub