Most valuable professional
  • Hot Topics

Excel Array/List of Lines from File

Hi, I'm after some assistance on converting some VB.Net code to VBA. The VB.Net Code is: - Code: Dim Dim Dim Dim Dim intFirstPos As Integer Dim intLastPos As Integer Dim intLength As Integer Dim System.Array.Sort(strFiles, If System.IO.File.Exists(strFiles(strFiles.Length - 1)) Then Using FS As New System.IO.FileStream(strFiles(strFiles.Length - 1), IO.FileMode.Open, IO.FileAccess.Read, IO.FileShare.ReadWrite) Using MyStreamReader As New System.IO.StreamReader(FS) While (MyStreamReader.Peek() > -1) strLines.Add(MyStreamReader.ReadLine) End While MyStreamReader.Close() End Using End Using

This question generated 9 answers. To proceed to the answers, click here.

This thread is current as of May 24, 2015.

For more resources for Microsoft Excel:

This article includes the following tags:

  • Excel
  • Microsoft Excel