vb修改txt内容问题??
第一次我把20后面的空格都删去,运行没错,第二次运行就多出来一行?为什么那??DimLAsIntegeri=1a=Text1.TextMyStr=""Open"F:\sw...
第一次我把20后面的空格都删去,运行没错,第二次运行就多出来一行?为什么那??
Dim L As Integer
i = 1
a = Text1.Text
MyStr = ""
Open "F:\sw\wb\equations.txt" For Input As #1
Do While Not EOF(1)
Line Input #1, LStr
L = InStr(LStr, "=")
LStr = Left(LStr, L)
LStr = LStr & a
MyStr = MyStr & LStr & vbCrLf
a = Text2.Text
Loop
Close #1
Open "F:\sw\wb\equations.txt" For Output As #1
Print #1, MyStr
Close #1
End Sub 展开
Dim L As Integer
i = 1
a = Text1.Text
MyStr = ""
Open "F:\sw\wb\equations.txt" For Input As #1
Do While Not EOF(1)
Line Input #1, LStr
L = InStr(LStr, "=")
LStr = Left(LStr, L)
LStr = LStr & a
MyStr = MyStr & LStr & vbCrLf
a = Text2.Text
Loop
Close #1
Open "F:\sw\wb\equations.txt" For Output As #1
Print #1, MyStr
Close #1
End Sub 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询