title: Excel-VBA SQL UPDATE Error "No value given for one or more required parameters"
body: <p>I'm trying to update NUM_ID to 1 where NUM_ID is 4.</p>
  
  <p>My table looks like this range A1:A6</p>
  
  <p>NUM_ID
  1
  1
  4
  2
  2</p>
  
  <p>Excel returns error "No value given for one or more required parameters" on code below. </p>
  
  <hr>
  
  <pre><code>Sub Update()
  
    Dim strNUM_ID As Double
    Dim strSQL As String
    Dim cnn As ADODB.Connection
  
    strNUM_ID = 1
  
    strSQL = "UPDATE [Sheet1$] " &amp; _
           "SET [NUM_ID] = strNUM_ID " &amp; _
           "WHERE [NUM_ID] = 4;"
  
    Debug.Print strSQL
  
    Set cnn = New ADODB.Connection
    With cnn
      .Provider = "Microsoft.ACE.OLEDB.12.0"
      .ConnectionString = "Data Source=C:\Temp" &amp; _
          "Test.xlsm;" &amp; _
        "Extended Properties=Excel 12.0;"
      .Open
      .Execute strSQL, DbFailOnError
    End With
  
    cnn.Close
    Set cnn = Nothing
  
  End Sub
  </code></pre>
  
  <hr>
  
  <p>Using Excel 2010</p>