Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

excel macro select from combo/select box

Posted on 2013-10-28
7
Medium Priority
?
183 Views
Last Modified: 2014-10-22
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
Comment
Question by:rutgermons
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 6

Expert Comment

by:ButlerTechnology
ID: 39605258
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
 

Author Comment

by:rutgermons
ID: 39618035
Tom

how can i get this to read from Oracle then?
0
 
LVL 31

Expert Comment

by:gowflow
ID: 39823769
I see this question is long time outstanding, do you still need help on this one too ?
gowflow
0
 

Accepted Solution

by:
rutgermons earned 0 total points
ID: 39824541
i actually got it to work myself so no worries!
0
 
LVL 49

Expert Comment

by:Martin Liss
ID: 40396428
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question