Hi, I need some help, i have to replace some bad characters like this "©" to this "é", i have 43 characters, can anyone help me.
The input file is a Txt file.
Thanks.
Printable View
Hi, I need some help, i have to replace some bad characters like this "©" to this "é", i have 43 characters, can anyone help me.
The input file is a Txt file.
Thanks.
What is wrong with the Replace command?
I think i have a sintax problem.
Hi Nanuk, Welcome to Codeguru !
I Hope the following example will help to you at all,
I opened a Smaple.txt file containing the following text;Code:Private Sub Command1_Click()
Dim variable1 As String
Open App.Path & "\sample.txt" For Input As #1
Do Until EOF(1)
'Does this loop until ' f>End Of File(' >EOF) for file number 1.
Line Input #1, Data
'Read one line and puts it into the vari
' ble Data.
variable1 = variable1 & vbCrLf & Data
'Adds the read line into Text1.
'MsgBox EOF(1)
Loop
Close #1
Text1.Text = Replace(variable1, "©", "é")
End Sub
"adadad©asd
©adas
ddd
asd
©
sdadkahd"
and when you will use the above code given here, it will changed to;
"adadadéasd
éadas
ddd
asd
é
sdadkahd"
So that means, you can easily use 'replace' for your codin purpose, convey me , if it works for you!
Happy Coding !! :thumb:
Quote:
Originally Posted by nanuk
thanks a lot it works.