Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Dropdown list

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Dropdown list

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)



"snax500" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 897
Default Dropdown list

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

On Mar 3, 4:15*pm, snax500 wrote:
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


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Dropdown list

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.


On Mar 3, 4:35*pm, "Bob Phillips" wrote:
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)

"snax500" wrote in message

...



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- Hide quoted text -


- Show quoted text -


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 897
Default Dropdown list

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


On Mar 3, 4:45*pm, snax500 wrote:
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.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Dropdown list

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)



"snax500" wrote in message
...
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.


On Mar 3, 4:35 pm, "Bob Phillips" wrote:
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)

"snax500" wrote in message

...



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- Hide quoted text -


- Show quoted text -



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
dropdown list determined by another dropdown list Wackyracer Excel Discussion (Misc queries) 5 April 27th 09 10:49 PM
Excell Dropdown List. Display alternate text than found in list. Shawnn Excel Discussion (Misc queries) 14 December 11th 08 07:43 PM
Dropdown List - list item endings not visible if column too narrow AK9955 Excel Discussion (Misc queries) 2 April 27th 07 09:02 AM
result of selecting from the dropdown list should be a dropdown list No News Excel Worksheet Functions 0 July 5th 06 04:09 PM
result of selecting from the dropdown list should be a dropdown list No News Excel Worksheet Functions 2 July 1st 06 10:53 AM


All times are GMT +1. The time now is 04:35 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"