Hello,
Excel 2013, SQL 2008R2
I am hoping this is the right forum and someone could point me in the right direction:
I have a Stored Procedure with a "Customer" parameter linking to an excel spreadsheet.
So far, I have an input box in Excel where the user can type the value and the command button will pull up the proper results:
Private Sub CommandButton1_Click()
Dim Customer As String
Member = Sheets("Sheet1").Range("K8").Value
With ActiveWorkbook.Connections("ABCWEB2 SQLReports sysdiagrams").OLEDBConnection
.CommandText = "EXEC dbo.usrsp_S_Customer_Census '" & Customer & "'"
ActiveWorkbook.Connections("ABCWEB2 SQLReports sysdiagrams").Refresh
End With
End Sub
My goal is to use a Combo Box for the user to select a value. I would like to use the stored procedure or SQL table to bring in the distinct values. As there will be new "Customer"s added frequently it needs to be a dynamic list.
How would I best accomplish this?
Thanks in advance for any assistance!
Excel 2013, SQL 2008R2
I am hoping this is the right forum and someone could point me in the right direction:
I have a Stored Procedure with a "Customer" parameter linking to an excel spreadsheet.
So far, I have an input box in Excel where the user can type the value and the command button will pull up the proper results:
Private Sub CommandButton1_Click()
Dim Customer As String
Member = Sheets("Sheet1").Range("K8").Value
With ActiveWorkbook.Connections("ABCWEB2 SQLReports sysdiagrams").OLEDBConnection
.CommandText = "EXEC dbo.usrsp_S_Customer_Census '" & Customer & "'"
ActiveWorkbook.Connections("ABCWEB2 SQLReports sysdiagrams").Refresh
End With
End Sub
My goal is to use a Combo Box for the user to select a value. I would like to use the stored procedure or SQL table to bring in the distinct values. As there will be new "Customer"s added frequently it needs to be a dynamic list.
How would I best accomplish this?
Thanks in advance for any assistance!