Dropdown list

  • Thread starter Thread starter snax500
  • Start date Start date
S

snax500

In Excel2000, I have the following code in a macro...

NAME = Application.InputBox("Type in Name to be filtered")

I want the user to use a list box ( with references to
range("o34:o50") instead of InputBox, less chance for spelling errors.
How do I replace the code?

Thanks
 
How about Data Validation? Debra Dalgleish has details on her website at

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
In addition to Bob's suggestion, you could also use the Type property
to let the user select a range of cells. See for example:

http://www.ozgrid.com/VBA/inputbox.htm

Set rRange = Application.InputBox(Prompt:= _
"Please select a range with your Mouse to be bolded.", _
Title:="SPECIFY RANGE", Type:=8)

If you use Type 8 then the user can select a range.

HTH,
JP
 
I wanted to have it within the macro so that a listbox pops on the
screen, the user chooses the name and then my macro takes the user
picked name and filters the data. I did not want data validation.
 
You could create a userform on the fly and populate a listbox with the
list of named ranges from your worksheet. Seems like a big project
though.


HTH,
JP
 
You could easily use the value selected in DV in your macro.

BTW, that website was http://www.contextures.com/xlDataVal01.html

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



I wanted to have it within the macro so that a listbox pops on the
screen, the user chooses the name and then my macro takes the user
picked name and filters the data. I did not want data validation.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top