title: Performing SQL queries on basic Excel 2013 worksheet as table using ADO with VBA triggers Errors
body: <p>I'm developping modules on a client XLSm with 32-bits 2013 Excel.</p>
  
  <p>I'd like to use datas on worksheet as if it is an Access table. </p>
  
  <p>With a lot of difficulties, I think connection is now OK.</p>
  
  <p>Still, I have error : 3001 Arguments are of wrong type, are out of acceptable range. Error that I cannot understand.</p>
  
  <p>Here excerpts of VBA lines :</p>
  
  <p>In addition, I added 20 lines in data Worksheet below the header line to permit to Excel to interpret for the type of each columns.</p>
  
  <pre><code>    varCnxStr = "Data Source=" &amp; G_sWBookREINVOICingFilePath &amp; ";" &amp;   "Extended Properties='Excel 12.0 Xml;HDR=YES;IMEX=15';"
  
      With conXLdb
          .Provider = "Microsoft.ACE.OLEDB.12.0"
          .Mode = adModeShareExclusive
          .Open varCnxStr
      End With
  
      strSQL = "SELECT * "
      strSQL = strSQL &amp; " FROM [ReInvoiceDB$B2B5072] inum "
      strSQL = strSQL &amp; " WHERE inum.InvoiceNum LIKE '1712*' "
      strSQL = strSQL &amp; ";"
  
      '&gt;&gt; TRIGGERs ERROR with the current Where Clause !!'
      adoXLrst.Open strSQL, conXLdb, dbOpenDynamic, adLockReadOnly, adCmdText
  
      If adoXLrst.BOF And adoXLrst.EOF Then
          'no records returned'
          GoTo Veloma
      End If
  
      adoXLrst.MoveFirst
  
      Do While Not adoXLrst.EOF
          'Doing stuff with row'
          adoXLrst.MoveNext
      Loop
  
      sHighestSoFar = adoXLrst(1).Value '&gt; just to try for RecordSet : Codes are not completed...
  
      sPrefixeCURR = Mid(sHighestSoFar, 1, 4)
      Highest = CInt(Mid(sHighestSoFar, 5))
  
      '&gt; Increment &gt;'
      Highest = Highest + 1
  
      HighestStr = sPrefixeCURR &amp; Format(Highest, "00")
  
      strGSFNumber = HighestStr
  
      adoXLrst.Close
      conXLdb.Close
  
  Veloma: 
      On Error Resume Next
      Set adoXLrst = Nothing
      Set conXLdb = Nothing
  Exit Sub
  </code></pre>
  
  <p>Etc.</p>
  
  <p>Any idea about what seems be wrong ?</p>
  
  <p>Thank you</p>