|
-
May 27th, 2007, 07:24 AM
#1
Replace Characters
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.
-
May 27th, 2007, 08:39 AM
#2
Re: Replace Characters
What is wrong with the Replace command?
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
-
May 27th, 2007, 09:23 AM
#3
Re: Replace Characters
I think i have a sintax problem.
-
May 27th, 2007, 10:03 AM
#4
Re: Replace Characters
Hi Nanuk, Welcome to Codeguru !
I Hope the following example will help to you at all,
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
I opened a Smaple.txt file containing the following text;
"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 !!
 Originally Posted by nanuk
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.
I'M BACK AGAIN !!
-------------------------------------------------------------------------
enjoy the VB ! 
If any post helps you, please rate that.
Always try to findout the Solutions, instead just discussing the problem and its scope!

-
May 28th, 2007, 07:27 AM
#5
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|