S
salooha
Hi there,
I have a macro that get data from an ODBC connection and dump into a
spreadsheet, the sql code get the data based on the login ID that I
have to manually enter into the vba code.
is there a way to create an inputbox in excel that pass this login ID
as a parameter to the sql code and then get the data based on what the
user enter into the input box?
Code:
--------------------
With ActiveSheet.QueryTables.Add(Connection:= _
"ODBC;DSN=datasource
dbo.users.ID where users.login = 'userID'
End With
--------------------
thanks in advance for your help..
I have a macro that get data from an ODBC connection and dump into a
spreadsheet, the sql code get the data based on the login ID that I
have to manually enter into the vba code.
is there a way to create an inputbox in excel that pass this login ID
as a parameter to the sql code and then get the data based on what the
user enter into the input box?
Code:
--------------------
With ActiveSheet.QueryTables.Add(Connection:= _
"ODBC;DSN=datasource
dbo.users.ID where users.login = 'userID'
End With
--------------------
thanks in advance for your help..