title: Get data from closed file with partly known name while also checking for more than one file
body: <p>I am trying to copy data from a closed Excel sheet and paste it into a worksheet in the active workbook. </p>
  
  <p>I have a file with both a date and time stamp</p>
  
  <p>I only care about the date stamp. There could be 2 for the same date with different time stamps.</p>
  
  <p>The file would be called: 'testYYYYMMDD_HHMMSS'<br>
  Filepath = 'H:\data\test\'</p>
  
  <p>The code so far is (where SFD is a YYYYMMDD format in a cell in the worksheet):</p>
  
  <pre><code>Sub NowOpenClosedWorkbook()
  
      Dim SFD As Range
      Dim xWb As Workbook
      Dim wbName As String
  
      Set SFD = Sheets("Sam's Test").Range("C2")
  
      On Error Resume Next
      Set xWb = Workbooks.Open("H:\data\test\" &amp; SamsFileDate &amp; "_??????.xlsx")
      wbName = xWb.Name
      If Err.Number &lt;&gt; 0 Then
          MsgBox "This workbook does not exist", vbInformation, "Kutools for Excel"
          Err.Clear
      Else
          MsgBox "The workbook is opened", vbInformation, "Kutools for Excel"
      End If
  End Sub   
  </code></pre>
  
  <p>The end goal:</p>
  
  <ul>
  <li><p>The file I need the data from shouldn't open</p></li>
  <li><p>The program should check if there more than one file with 'testYYYYMMDD_HHMMSS' only have one a day, however there could be 2. In this scenario, it alerts the user and stops the program.</p></li>
  </ul>