title: How to find, open, and refer to workbook with partial name
body: <p>I am trying to use a partial name match to locate a template file (full name <code>On-Call Audit Sheet VXX</code> where VXX is the version) that gets updated from the current workbook with the macro I am writing.</p>
  
  <p>The macro needs to locate the file with a partial name match; if found then open it and define the workbook as <code>wb1</code>, if not found then return an error. Current code below partially inspired by <a href="https://stackoverflow.com/questions/41846874/excel-macro-to-open-file-with-partial-filename">this post</a>.</p>
  
  <p>So far the macro can locate and open the file with partial name match using the <code>FileSystemObject</code> to grab the current folder path, but I can't work out how to then define <code>wb1</code> with the partial name match.</p>
  
  <p>Is there a way to get the full name of the file once the partial match is successful and thus define <code>wb1</code> from that?</p>
  
  <pre><code>Sub anotherTest()
  
      Dim fso As FileSystemObject
      Dim fldBase As Folder
  
      Dim wb1 As Workbook
      Dim ws1 As Worksheet
  
      Set fso = New FileSystemObject
      'determining current folder location based on where the dashboard file is
      Set fldBase = fso.GetFolder(ThisWorkbook.Path)
  
      For Each Item In fldBase.Files
          If InStr(Item.Name, "*Audit Sheet*") Then
              Workbooks.Open (fldBase &amp; "\" &amp; Item.Name) '&lt;-- Open workbook
              Set wb1 = Workbooks(fldBase &amp; "\" &amp; Item.Name) '&lt;-- set workbook to wb1, THIS BIT DOESNT WORK
          Else
              MsgBox "File not found" '&lt;-- if not found exit sub after showing error
              Exit Sub
          End If
      Next
  
      'Rest of the macro
  
  End Sub
  </code></pre>