-
I want to overwrite certain characters within a file
for example if a file contained the characters "FT"
I want to search for the occurrence of "FT" and overwrite it with "HT"
Does anybody know of an API or function which will carry out this task
any help is greatly appreciated
-
Code:
Dim sText As String
Private Sub Command1_Click()
Open "C:\MyFile.txt" For Input As #1
sText = Input(LOF(1), 1)
sText = Replace(sText, "FT", "HT")
Close #1
End Sub
Private Sub Command2_Click()
Open "C:\MyFile.txt" For Output As #1
Print #1, sText
Close #1
End Sub