' Display the Open dialog box
dlgFileOpen.ShowOpen
' Display name of selected file
strFileName = dlgFileOpen.FileName
Me.Refresh 'Refresh the pic.
' SetCursor (gLnCurBusy) 'Set cursor to be busy.
' Get the File Num.
intFileNum = FreeFile
' File Open
err.Clear
Open strFileName For Input As #intFileNum
If err.Number > 0 Then
'OPEN Fail!
handleMsg "30001"
GoTo err
End If
Me.Refresh
Do While Not EOF(intFileNum) ' Read file untile blank line.
err.Clear
Line Input #intFileNum, buff
If buff = "" Then ' Blank line, exit.
Exit Do
End If
iRow = iRow + 1
buff = LTrim(buff)
' Modify by LiuYang 2002/11/21
If Len(buff) <> intLiu_TANA_REC_ACTS And Len(buff) <> intLiu_TANA_REC_PRISM Then
MsgBox "第 " & iRow & " 行の長さが間違っています!", vbCritical, "YFC保管システム"
' Unload dlgProcessBar
GoTo err
End If
' Modify End
Loop
Close #intFileNum
Open strFileName For Input As #intFileNum
Do While Not EOF(intFileNum) ' Read file untile blank line.
err.Clear
Line Input #intFileNum, buff
If buff = "" Then ' Blank line, exit.
Exit Do
End If
If err.Number > 0 Then ' Error.
'READ Fail!
handleMsg "30001"
' Unload dlgProcessBar
GoTo err
End If