Results 1 to 3 of 3

Thread: Listbox and array problems plz help

  1. #1

    Thread Starter
    Member
    Join Date
    Apr 2000
    Location
    Birmingham UK
    Posts
    50

    Thumbs down Listbox and array problems plz help

    Dim check As Boolean
    Dim mess As String * 100
    Dim C As Integer
    Dim Infor1 As String
    Dim Infor2 As String



    ' check if cybot.txt exist if not then create it in the same directory

    check = fsys.FileExists(App.Path & "\cybot.txt")

    If check = False Then

    fsys.CreateTextFile (App.Path & "\cybot.txt")

    inputdata = Trim$(Lstoutput.Text)

    inputdes = Trim$(Text1.Text)
    End If

    Counter = 1


    Open (App.Path & "\cybot.txt") For Input As #1

    While Not EOF(1)



    Input #1, Infor1
    Input #1, Infor2

    data1(Counter) = Infor1



    Lstoutput.AddItem data1(1)
    Text1.Text = data2(Counter)


    Counter = Counter + 1



    Wend



    Close #1


    guy's i am new to this and i need help what i want to acheive is

    when a user clicks on Listbox item number 2 it then displays the description of that item in the text box and i mean its that simple

    the problem is i have try alsort of coding method and now have just given up can anyone help me here the above code runs at form load its purpose is to open the file and load the infor into the arrary ready for using to use it when they click on the list box

    please help me

    many thanks
    Waheed Rafiq (ICT Technician):
    Network +

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    Ok, so you have a listbox populated with stuff from a text file.

    Where are the item description stored? Are they also in the text file?

  3. #3

    Thread Starter
    Member
    Join Date
    Apr 2000
    Location
    Birmingham UK
    Posts
    50
    yes both are store in a text file plz help me
    Waheed Rafiq (ICT Technician):
    Network +

Posting Permissions

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



Click Here to Expand Forum to Full Width