title: Run Time Error 13 Type Mismatch
body: <p>Im getting an automation error when trying to run a select string for Ms Excel VBA</p>
  
  <p>Code is as follows:</p>
  
  <pre><code>Dim cn As ADODB.Connection
  Dim rs As ADODB.Recordset
  Dim strsql As String
  
  Set cn = New ADODB.Connection
  Set rs = New ADODB.Recordset
  
  Set cn = New ADODB.Connection
  
  Application.ScreenUpdating = False
  
  DBPath = "Path of Access DB HERE"
  DBProvider = "Provider=Microsoft.Jet.OLEDB.4.0;"
  dbparam = DBProvider &amp; "data source =" &amp; DBPath
  
  a = Sheets(1).ComboBox2.Value
  
  cn.Open dbparam
  With rs
      .Open "Qry_WBT", cn, adOpenDynamic, adLockOptimistic, adCmdTable
      ***.Open "Select * From " &amp; [Qry_WBT] &amp; " WHERE " &amp; "[WBT Name] = '" &amp; a &amp; "'", cn, adOpenKeyset, adLockOptimistic, adCmdTable***
      If rs.EOF = True Then
          MsgBox "No Data in selected field", vbOKOnly
          Exit Sub
      End If
  End With
  </code></pre>
  
  <p>Error comes in the .open "Select blah blah blah " section</p>