Solved

Make an AutoFilter like listbox

Posted on 2000-03-05
6
385 Views
Last Modified: 2008-01-09
I would like to make a listbox based on a column of data in an Excel spreadsheet, just like the one generated when you turn the AutoFilter on.  (I would like it to contain one of every different entry in the column, arranged alphabetically.) How do I do this?  Is there a function I can use? Thank you.  
0
Comment
Question by:to_adam
  • 5
6 Comments
 

Author Comment

by:to_adam
ID: 2771889
Adjusted points from 50 to 343
0
 

Author Comment

by:to_adam
ID: 2771890
Please, does anyone have any ideas?  Is it simply impossible? Or very difficult?  
0
 
LVL 1

Accepted Solution

by:
riduce earned 343 total points
ID: 2920602
Range("D1:D15").Select
    Selection.Sort Key1:=Range("D1"), Order1:=xlAscending, Header:=xlGuess, _
        OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
    Selection.AutoFilter
0
Industry Leaders: 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!

 

Author Comment

by:to_adam
ID: 2946998
Answer accepted
0
 

Author Comment

by:to_adam
ID: 2946999
Thank you very very much... I'm just having a hard time believing it's that easy!   I spent over 3 hours trying to work that out, and have now waited over 3 months for the answer!  Thank-you very much!!
0
 

Author Comment

by:to_adam
ID: 2971139
YIKES...  I can't get that to work in a dialog box though. (It just works on the spreadsheet itself.)  Is their any way to create an autofilter-like listbox in a form?
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

713 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