i connect my excel to MS SQL and i want excute the query :
SELECT * FROM Customers
WHERE Country='Germany' AND (City='Berlin' OR City='München');
and its work fine
i want use it on vba:
Set rs=c.Execute(“SELECT * FROM Customers" & _
WHERE Country='Germany' AND (City='Berlin' OR City='München');”)"
now how can set VAR inside the query: Country and City something like range("A1").value or declare variable dim city as string.