I need Excel help. I need to keep using the following code to load a CSV into an Array, Can somebody complete the code to make it work for me? THANKS!
Thanks again!
Code:
Sub Import_CSV()
Dim CSV_File As String
Dim iFileNum As Integer
Dim CSV_Row_Line As String
CSV_File = "C:\Sample.csv"
iFileNum = FreeFile()
Open CSV_File For Input As iFileNum
Do While Not EOF(iFileNum)
Line Input # iFileNum, CSV_Row_Line
'How to asign the full number of rows and columns in the cvs file to an array!
' Data(i,j) = CSV_Row_Line split by "," ?????!
'If there is a way to asign it all at once it may work, but I am also interested in reading the CSV file them row by row.
End If
Loop
Close iFileNum
End Sub
Thanks again!
Last edited: