Page 4 of 4 FirstFirst ... 234
Results 31 to 33 of 33

Thread: Listbox search at any position
Thanks Thanks: 0 Likes Likes: 0

  1. #31
    Board Regular
    Join Date
    Nov 2018
    Posts
    209
    Post Thanks / Like
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Listbox search at any position

    @Fluff can you please create a search box for the code
    Code:
    Private Sub UserForm_Initialize()Dim x As Long, FileNum As Long, TotalFile As String, Lines As Variant
    FileNum = FreeFile
    Open "c:\Users\History.txt" For Binary As #FileNum 
    TotalFile = Space(LOF(FileNum))
    Get #FileNum , , TotalFile
    Close #FileNum 
    Lines = Split(TotalFile, vbCrLf)
    With ListBox1
    For x = UBound(Lines) To 0 Step -1
    
    
        .AddItem Split(Lines(x), "|")(0)
        .List(.ListCount - 1, 1) = Mid(Lines(x), InStr(1, Lines(x), "|") + 1)
    
    
    Next
    End With
    
    ListBox1.ColumnWidths = "0;200"
    End Sub
    the columncount = -1
    Last edited by yinkajewole; May 22nd, 2019 at 02:34 PM.

  2. #32
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    29,229
    Post Thanks / Like
    Mentioned
    483 Post(s)
    Tagged
    49 Thread(s)

    Default Re: Listbox search at any position

    This question has nothing to do with your op, so please start a new thread
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

  3. #33
    Board Regular
    Join Date
    Nov 2018
    Posts
    209
    Post Thanks / Like
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Listbox search at any position

    Quote Originally Posted by Fluff View Post
    This question has nothing to do with your op, so please start a new thread
    I'm sorry, i thought it still goes along with this thread so as not to have duplication of threads, nevertheless, according to your word, i'll start a new thread, thanks

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •