一道VB题 求大神帮忙

大神速度 同学在考试啊

Private Sub Command1_Click()
Dim Comfiles As String
Dim strTEMP As String
Dim strTEMP1 As String
Dim TextLine As String
Dim GodsCount As Long
'选取路径
CommonDialog1.Filter = "所有文件 |*.*"
CommonDialog1.FilterIndex = 1
CommonDialog1.InitDir = App.Path
CommonDialog1.ShowOpen
Comfiles = CommonDialog1.FileName
strTEMP = InputBox("输入第一个数据:")
Open Comfiles For Input As #11
Do While Not EOF(11)
Line Input #11, TextLine
If InStr(TextLine, strTEMP) <>0Then

strTEMP1 = Split(TextLine, ",")(1)
GodsCount = GodsCount + Val(strTEMP1)

End If
Loop
Debug.Print GodsCount
End Sub
温馨提示:内容为网友见解,仅供参考
无其他回答
相似回答
大家正在搜