The code bellow basically opens each customer .txt file (each having a 0 to 10 array) I want to extract two entities from each array (depending if array number "9" = yes) but when I run the de-bug comes up on the part of the code which opens the file, the file being opened with the .path and .filename so where am I going wrong??![]()
On Form Load:
Code:Dim CusData(0 To 10) As String Dim i As Integer Dim Customer As Integer Private Sub Form_Load() File1.Path = (App.Path & "\SAVED_DATA\CustomerPI") i = 0 Customer = File1.ListIndex Customer = 0 For Customer = 0 To File1.ListCount - 1 Open (File1.Path & "\" & File1.FileName) For Input As #1 Do While Not EOF(1) Input #1, CusData(i) i = i + 1 Loop If CusData(9) = "yes" Then lblM1.Caption = CusData(7) lblM2.Caption = CusData(10) End If Close #1 Next Customer End Sub




Reply With Quote
