BalloutMoe
Board Regular
- Joined
- Jun 4, 2021
- Messages
- 137
- Office Version
- 365
- Platform
- Windows
Hello All
I have the below code just a sample that reads a TextFile so I can loop it however it is not reading the whole file. When I open the text file and save it as a UTF8 with no BOM from the ANSI format it read it all, any help with this? How can I read it as the ANSI format. Thank you
I have the below code just a sample that reads a TextFile so I can loop it however it is not reading the whole file. When I open the text file and save it as a UTF8 with no BOM from the ANSI format it read it all, any help with this? How can I read it as the ANSI format. Thank you
VBA Code:
Dim fso As Object
Set fso = CreateObject("Scripting.FileSystemObject")
Set fileopening = fso.OpenTextFile(txtFileName, 1)
arrTxt = Split(fileopening.ReadAll, vbNewLine) 'vbCrLf