Horje
vba get text file content Code Example
vba get text file content
' Returns an array of lines from a text file
Function FileInArray() As Variant
    Dim fileSO As Object, textFile As Object, content
    On Error GoTo CExit
    Set fileSO = CreateObject("Scripting.FileSystemObject")
    Set textFile = fileSO.OpenTextFile("C:\temp\file.txt", 1)
    content = textFile.ReadAll
    FileInArray = Split(content, vbNewLine)
    textFile.Close
CExit:
End Function




Vb

Related
excel insert blank row for value change in column Code Example excel insert blank row for value change in column Code Example
extract word in a text in excel Code Example extract word in a text in excel Code Example
extract the nth word from a text string Code Example extract the nth word from a text string Code Example
excel vba how to reset usedrange Code Example excel vba how to reset usedrange Code Example
vba file from path Code Example vba file from path Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9