tejubjp 0 Newbie Poster

Actuaally i wan to read first column of "ProjectList" text file
that contains......

Name of project Allocation Time in hrs Members for projects
--------------------------------------------------------------------------------------
pro1 15 abc
pro2 20 xyz


And i wan to display name of projects only into combo box......
(how to use Random Access File Concept....)

Please help me.....

Private Sub cmdRead_Click()
Dim FName As String, FNum As Integer
Dim LineContents As String

FName = "c:\ProjectList.txt"
FNum = FreeFile

Open FName For Input As #FNum
Do While Not EOF(FNum)
    Line Input #FNum, LineContents
    cmbRead.AddItem LineContents
Loop
Close #FNum

End Sub
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.