发布网友 发布时间:2024-10-18 10:56
共1个回答
热心网友 时间:2024-12-04 19:28
label1.caption=mid(text1,instr(text1,"¥1¥"),instr(text1,"¥3¥")-instr(text1,"¥1¥"))追问细讲一下吧,感觉不大对追答题目没看清,重写代码:
Private Sub Command1_Click()
Dim s As String, t As String
Open "d:\111.txt" For Input As #1
While Not EOF(1)
Input #1, t
s = s & t & vbCrLf
Wend
Close #1
t = Left(s, InStr(1, s, "¥1¥") + 2)
t = t & Label1.Caption & Right(s, Len(s) - InStr(1, s, "¥3¥") + 1)
Open "d:\111.txt" For Output As #1
Print #1, t
Close #1
End Sub