Dim reader as StreamReader = My.Computer.FileSystem.OpenTextFileReader(filetoimport.Text) Dim a as String Do a = reader.ReadLine ' ' Code here ' Loop Until a Is Nothing reader.Close()