Guest User

Untitled

a guest
Oct 16th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. -1,0,3,0,5,4,6,7,8,9
  2.  
  3. Name: [ Value -1 ]
  4. Nationality: [ Value 0 ]
  5. Experience: [ Value 3 ]
  6.  
  7. Dim rawData as string
  8.  
  9. Dim FileText as String
  10. Dim FileNo as Integer
  11. FileNo = FreeFile
  12. Open "C:test.txt" For Input As #FileNo 'you should change the file path
  13. Line Input #FileNo, FileText 'read the whole line
  14. rawData = sFileText 'store the first line of the text file in 'rawData'
  15. Close #FileNo
  16.  
  17. Dim data() as string 'an array that will hold each value
  18. data = Split(rawData, ",") 'split 'rawData' with a comma as delimiter
  19.  
  20. Dim newData as String
  21. newData = data(0) & "," & data(1) & "," & data(2) 'etc.
Add Comment
Please, Sign In to add comment