I am a VB novice so any help would be appreciated!
I need to search through a string and replace any carriage returns, commas and line feeds with spaces. How can I do this?
Thanks
Printable View
I am a VB novice so any help would be appreciated!
I need to search through a string and replace any carriage returns, commas and line feeds with spaces. How can I do this?
Thanks
get the help on following using MSDN & try it urself
- Mid() , Instr() , Replace() , Chr() , Asc() ....
Shrinka is right, but for a quick solution:
mystring= replace(mystring,vbcrlf, "")
mystring= replace(mystring,",", "")
mystring= replace(mystring,chr(13) & " ", "")
Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, TCartwright, Bruno Paris, Dr_Michael
and all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
The Rater
I mispelled your nickname. Sorry...
Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, TCartwright, Bruno Paris, Dr_Michael
and all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
The Rater
dim str as string
str = "This is a s,tring with some tabs,commas
and one carriage return"
str = Replace(str,","," ")
str = Replace(str,vbCrLf," ")
str = Replace(str,vbTab," ")
O/P :"This is a s tring with some tabs commas and one carriage return"
No longer!
with regard to mis-spell - that's alright!!!
That's not my Nick Name but the Name
i couldn't reply in detail as I was busy at that time
Have a nice Day
Srinika