Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / March 2008

Tip: Looking for answers? Try searching our database.

Dropdown list

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
snax500 - 03 Mar 2008 21:15 GMT
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
Bob Phillips - 03 Mar 2008 21:35 GMT
How about Data Validation? Debra Dalgleish has details on her website at

Signature

---
HTH

Bob

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

> In Excel2000, I have the following code in a macro...
>
[quoted text clipped - 5 lines]
>
> Thanks
snax500 - 03 Mar 2008 21:45 GMT
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.

> How about Data Validation? Debra Dalgleish has details on her website at
>
[quoted text clipped - 17 lines]
>
> - Show quoted text -
JP - 03 Mar 2008 22:19 GMT
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

> 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.
Bob Phillips - 03 Mar 2008 23:04 GMT
You could easily use the value selected in DV in your macro.

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

Signature

---
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.

On Mar 3, 4:35 pm, "Bob Phillips" <bob....@somewhere.com> wrote:
> How about Data Validation? Debra Dalgleish has details on her website at
>
[quoted text clipped - 22 lines]
>
> - Show quoted text -
JP - 03 Mar 2008 21:45 GMT
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

> In Excel2000, I have the following code in a macro...
>
[quoted text clipped - 5 lines]
>
> Thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.