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