display info from listbox

Posted on 2006-04-25
Last Modified: 2010-05-01
I have a listbox and I would like to display just the emails from a .txt file that contains this;password1;password2;password3

how can I do that?
Question by:aplelois
    1 Comment
    LVL 44

    Accepted Solution

    Hi aplelois,

    Private Sub Command2_Click()
        Dim lngFHandle As Long
        lngFHandle = FreeFile()
        Open "MyInputFile.txt" For Input As #lngFHandle
            Line Input #lngFHandle,strLine
            List1.AddItem Split(strLine,";")(0)
        Loop Until Eof(lngFHandle)
        Close #lngFHandle
    End Sub

    Will do it.

    Tim Cottee

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
    You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
    Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

    745 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

    15 Experts available now in Live!

    Get 1:1 Help Now