Dim lngTmp As Long
Dim strFile As String
Dim aa() As String
On Error GoTo PROC_ERR
lngTmp = FreeFile()
Open strPath For Binary Access Read As #lngTmp
strFile = CStr(Input(LOF(lngTmp), #lngTmp))
Close #lngTmp
aa = Split(strFile, Chr(13))
lngLine = UBound(aa)
GetFileLine = True
Exit Function
PROC_ERR:
GetFileLine = False
aa中存放的就的是那个文件Dim lngTmp As Long
Dim strFile As String
Dim aa() As String
On Error GoTo PROC_ERR
lngTmp = FreeFile()
Open strPath For Binary Access Read As #lngTmp
strFile = CStr(Input(LOF(lngTmp), #lngTmp))
Close #lngTmp
aa = Split(strFile, Chr(13))
lngLine = UBound(aa)
GetFileLine = True
Exit Function
PROC_ERR:
GetFileLine = False
aa中存放的就是每一行的数据!
dim i as integer
dim str as string
dim lngtemp as long
dim lngCount1 as long
dim strTmp as string
i=0
dim strVal as string
for lngtmp=lbound(aa) to ubound(aa)
if i mod 10<>0 then
i=i+1
strval=trim(aa(lngtmp))
for lngtemp=1 to len(trim(aa(lngtmp)))
strtmp=left(strval,1)
if strtmp="x" then
str=str & "/"
else
str=str & strtmp
end if
strval=mid(strval,2,len(strval)-1)
next lngtemp
else
strval=trim(aa(lngtmp))
for lngtemp=1 to len(trim(aa(lngtmp)))
strtmp=left(strval,1)
if strtmp="x" then
str=str & "/"
else
str=str & strtmp
end if
strval=mid(strval,2,len(strval)-1)
next lngtemp
str=str & vbCrLf
end if
next lngtmp
msgbox str
str中存的就是那个信息!