vbでawkのような処置をするためには
Sub read_file()
Dim aaa(100)
strFileName = "c:\readme.txt"
Set objFileSystem = CreateObject("Scripting.FileSystemObject")
Set objfile = objFileSystem.OpentextFile(strFileName)
Do Until objfile.atendofstream
'objfile.Write (str_message)
strRecBuff = objfile.readline
MsgBox strRecBuff
aaa(0) = split_tabl_ch(strRecBuff, 0, " ")
aaa(1) = split_tabl_ch(strRecBuff, 1, " ")
aaa(2) = split_tabl_ch(strRecBuff, 2, " ")
MsgBox aaa(0) & "," & aaa(1) & "," & aaa(2)
Loop
objfile.Close
End Sub
Function split_tabl_ch(strTemp, intind, chr_chr)
Dim l
Dim i
Dim j
'Dim strTemp
Dim strKaeri
Dim FieldName(18)
Dim FieldValue(18)
j = 0
l = Len(strTemp)
i = 1
Do While i <= l
If Mid(strTemp, i, 1) = chr_chr Then
j = j + 1
FieldValue(j) = ""
Do While i <= l And Mid(strTemp, i, 1) = chr_chr
i = i + 1
Loop
Else
FieldValue(j) = FieldValue(j) & Mid(strTemp, i, 1)
i = i + 1
End If
Loop
split_tabl_ch = FieldValue(intind)
End Function