I need to pass a variable to SQL using VB6 in Excel. What am I doing wrong? Code as follows:
Dim stri as String
stri = “12345”
“SELECT * “FROM TABLE” & Chr(13) & “” & Ch(10)& “WHERE (INV_TABLE.INVOICE_NUMBER=’stri’)”)
Does not recognize 12345 in stri.