Private Sub Command1_Click() Open App.Path + "\1.txt" For Input As #1 Open App.Path + "\2.txt" For Binary As #2 Do While Not EOF(1) Dim tmp, tmp2 As String Dim l As Long Line Input #1, tmp l = InStr(1, tmp, "name") tmp2 = Mid(tmp, 1, l - 1) & "name" & 你的函数ABC(Mid(tmp, l + 4)) & vbCrLf Put #2, , tmp2 Doevents '防程序卡死 Loop Close #1 Close #2 End Sub |
|