Hi-
I am pulling a report from SQL in Excel. I got it all working, except I need multiple user prompts (one parameter with multiple values).
So I decided to use a listbox which contains all the possible selection that I want the user to choose from (These values are on another sheet in the same workbook) and then when a button is clicked, it displays the information in that same worksheet base on the selected choices the user choose.
This information that is being displayed is coming straight from SQL.
I tried using a userform in VBA in Excel, but I am still not quite sure how to have it pull from SQL base on the selections in the listbox.
I had it where the information was displayed, except I was only able to input one parameter at a time. I want the user to be able to do multiple selections and then the information is displayed.
In my query I had wmav_code = ? to prompt the user to input what code they wanted, bus as stated before, its just one. I tried wmav_code in (?,?,?,?), however, that's limiting the prompts to 4. I have 97 various codes to choose from (Hence the decision to use a listbox).
I tried (InStr(?, [wmav_code])>0), but Excel 2016 does not recognize that function (InStr()).
P.S. These are all within the 'WHERE' clause.
Any help is appreciated!!!
Thank you!
I am pulling a report from SQL in Excel. I got it all working, except I need multiple user prompts (one parameter with multiple values).
So I decided to use a listbox which contains all the possible selection that I want the user to choose from (These values are on another sheet in the same workbook) and then when a button is clicked, it displays the information in that same worksheet base on the selected choices the user choose.
This information that is being displayed is coming straight from SQL.
I tried using a userform in VBA in Excel, but I am still not quite sure how to have it pull from SQL base on the selections in the listbox.
I had it where the information was displayed, except I was only able to input one parameter at a time. I want the user to be able to do multiple selections and then the information is displayed.
In my query I had wmav_code = ? to prompt the user to input what code they wanted, bus as stated before, its just one. I tried wmav_code in (?,?,?,?), however, that's limiting the prompts to 4. I have 97 various codes to choose from (Hence the decision to use a listbox).
I tried (InStr(?, [wmav_code])>0), but Excel 2016 does not recognize that function (InStr()).
P.S. These are all within the 'WHERE' clause.
Any help is appreciated!!!
Thank you!