![]() |
#1
|
|||
|
|||
![]()
I desperately need help. I have an Excel Spreadsheet on the Data Tab I am pulling in all the data from a SQL Table. On the First Tab I have pulled out all the columns I want to pull in from the data tab. However I need to make a list box or control or something that allows the user to select a scenario and then all the data associated with that scenario on the Data Tab gets pulled in. Please someone I can't make this work I can add the Data to the data tab with all of the scenarios in it. I just can't figure out how the user can select the scenario on Tab 1 and then all the data gets populated to the appropriate columns. I tried list but don't know how to focus I tried scenario manager or data validation but I have 40 columns and 30 rows that need to be pulled in after the scenario is chosen.
Any help or suggestion would be greatly appreciated. |
#2
|
|||
|
|||
![]() |
#3
|
|||
|
|||
![]()
If you use data validation you can use the Worksheet_Change event to run a macro based on the selection,
but somewhere you'd have to layout what the possible scenarios are. Any chance of you attaching a sample workbook indicative of what you're working with and trying to achieve? |
#4
|
|||
|
|||
![]()
Obviously you get data from SQL Server with ODBC query. Let's assume the query is something like
Code:
SELECT * FROM SqlView Code:
SELECT * FROM SqlView WHERE Field1 = ? AND Field2 = ? On sheet where queried data appear, leave/insert some empty rows at top (at least the number of parameters +1). Define Data validations to select parameter values at top cells, and select some parameter values there. Now redefine your query like was shown before, and point cells with selected parameters when asked. |
![]() |
Tags |
excl, list, user control |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Could you help me create a control button/check box to enable user to delete a row? | baes10 | Word Tables | 2 | 12-11-2017 10:10 AM |
![]() |
NathanEat | Word | 4 | 05-27-2015 09:04 PM |
How can I get Outlook from one user to another w/o a .pst file (primary user on computer is corrupt) | Tenmakk | Outlook | 0 | 03-01-2015 12:49 PM |
![]() |
keithacochrane | Word | 1 | 05-28-2012 05:06 PM |
issue in nested user control | selva | Misc | 1 | 10-20-2011 10:18 PM |