06-26-2019
09:29 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
06-26-2019
09:29 AM
Your code is fine, what happens is that you need to have well defined the separators of the strings, otherwise the task becomes more difficult. regards
oFile = "C:\Users\Sergio\Desktop\Example.txt" oRead = System.IO.File.OpenText(oFile) 'read the file oRead = System.IO.File.OpenText(oFile) EntireFile = oRead.ReadToEnd() oRead.Close() 'create aray from text info 'splitting at that comma oSplit = Split(EntireFile, " ") For Each wrd In oSplit MessageBox.Show("Word Index #" & i & " = " & oSplit(i)) i += 1 Next
Please accept as solution and give likes if applicable.
I am attaching my Upwork profile for specific queries.
Sergio Daniel Suarez
Mechanical Designer
| Upwork Profile | LinkedIn