ok i almost have this working however i'd like to make it more efficient. right now i read in a file with the input function and use the loc and LOF functions to determine the length and position of the record. in doing so i use a progress bar. however this is very slow and i would like to make it run faster. i know i could make the number greater in the input function but i never know how long a record is to the carriage return and line feed ASCII codes. what i would like to do is use the input statement rather then the function if possible and read each column into a variable. I know how many columns there are just not the length. here is the code so far.


VB Code:
  1. Dim sBuffer As String
  2.     Dim x As String
  3.    
  4.     With Me.ProgressBar1
  5.         .Min = 0
  6.         .Max = FileLen(App.Path & "\ClassPosition_SkillList.txt")
  7.     End With
  8.    
  9.     Open App.Path & "\ClassPosition_SkillList.txt" For Binary As #1   ' Open file just created.
  10.    
  11.     Do While Loc(1) < LOF(1)   ' Loop until end of file.
  12.         DoEvents
  13.         x = Input(1, #1)
  14.        
  15.         If x <> "" Then
  16.             If Asc(x) <> 10 And Asc(x) <> 13 Then
  17.                 sBuffer = sBuffer & x
  18.             Else
  19.                 sBuffer = ""
  20.             End If
  21.         End If
  22.         Me.ProgressBar1.Value = Loc(1)
  23.     Loop
  24.     Close #1

any help will be greatly appreciated.