Solved

Make an AutoFilter like listbox

Posted on 2000-03-05
6
380 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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 

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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…

707 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now