title: VBA - msgbox when file not found
body: <p>I want a msgbox to show "File not found" when the file TestData.xlsx is not found. Thanks</p>
  
  <pre><code>Sub check()
      Dim i As Long
  
      '~~&gt; From Row 5 to row 10
      '~~&gt; Chnage as applicable
      For i = 5 To 10
          Sheets("Sheet1").Range("F" &amp; i).Formula = _
          "=VLookup((CONCATENATE(C1,"" "",C" &amp; i &amp; _
          ")),'C:\Documents[TestData.xlsx]Sheet1'!$A$2:$G$28,7, FALSE)"
  
          Sheets("Sheet1").Range("F" &amp; i).Value = Sheets("Sheet1").Range("F" &amp; i).Value
      Next i
  End Sub
  </code></pre>