• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 185
  • Last Modified:

excel macro select from combo/select box

Folks

I am looking for advice to select values from a combo box

essentially my macro connects to oracle db and queries a table and allows the user to specify the where claue input field i.e like so

 strSQL = "Select projectnum,description from projects where " & InputBox(Prompt:="Your where clause.", _

essentially my where clause statements are contained in another table called queries

here the colomn queries.whereclause contains the actual where clause

how do i create a combo or select box to select the where clause automatically?

any ideas would be great

essentially it should do the following in psueadocode

 strSQL = "Select projectnum,description from projects where " & (select queries.whereclause value)

thanks in advance!
0
rutgermons
Asked:
rutgermons
1 Solution
 
ButlerTechnologyCommented:
I have attached a workbook with a combo-box example.  Columns A and B are used to generate the entries for the list box.  I use the A column as an index as the combo-box returns the entry being selected -- not the value.  Cell D1 is used to hold the value that is selected and F2 is using a vlookup to display the selection.  There is a macro that is attached to the combo-box that executes when selecting an item.  It will use the message box that displays the selection using F2.
Combo-Box Properties
Tom
Combo-Box-Example.xlsm
0
 
rutgermonsAuthor Commented:
Tom

how can i get this to read from Oracle then?
0
 
gowflowCommented:
I see this question is long time outstanding, do you still need help on this one too ?
gowflow
0
 
rutgermonsAuthor Commented:
i actually got it to work myself so no worries!
0
 
Martin LissRetired ProgrammerCommented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now