|
-
May 5th, 2004, 09:23 AM
#1
Thread Starter
Frenzied Member
How to replace Tab characters?
Esteemed Forum Members and Lurkers:
How do I remove Tab characters out of a string?
I have strings read from a tab delimited file, and I need to trim and split them.
The following works elsewhere, but NOT in VB.Net.
Dim tempstr As String
' Simulate my string from the file - Chr(9) is a Tab
tempstr = "336" & Chr(9) & "G1"
Replace(tempstr, Chr(9), " ")
MsgBox(Asc(Mid(tempstr, 1, 1))) ' 51 - 3
MsgBox(Asc(Mid(tempstr, 2, 1))) ' 51 - 3
MsgBox(Asc(Mid(tempstr, 3, 1))) ' 54 - 6
MsgBox(Asc(Mid(tempstr, 4, 1))) ' 9 Tab - Should be space!
MsgBox(Asc(Mid(tempstr, 5, 1))) ' 84 - G
MsgBox(Asc(Mid(tempstr, 6, 1))) ' 49 - 1
Any comments, suggestions, or assistance would be greatly appreciated.
Last edited by Webtest; Feb 2nd, 2005 at 03:38 PM.
Blessings in abundance,
All the Best,
& ENJOY!
Art . . . . Carlisle, PA . . USA
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
|