hi,
i'm trying to write a replace statement and I'm having a problem.
the string is
"canon\tpowershot a290\t...."
i want to replace every \t with a horizontal tab.
i have it as
str = replace(string, "\t", chr(11))
this doesn't seem to work since I don't think i have the write ascii code
for a horizontal tab.

please advise.
rafael

Re: find and replace horizontal tab by McKirahan

McKirahan
Tue Mar 15 17:50:23 CST 2005

"Rafael Chemtob" <rchemtobb@nospam.yahoo.com> wrote in message
news:uPu0mibKFHA.2716@TK2MSFTNGP15.phx.gbl...
> hi,
> i'm trying to write a replace statement and I'm having a problem.
> the string is
> "canon\tpowershot a290\t...."
> i want to replace every \t with a horizontal tab.
> i have it as
> str = replace(string, "\t", chr(11))
> this doesn't seem to work since I don't think i have the write ascii code
> for a horizontal tab.
>
> please advise.
> rafael

Try:

str = replace(string, "\t", vbTab)



Re: find and replace horizontal tab by Brian

Brian
Tue Mar 15 17:52:40 CST 2005

Rafael Chemtob wrote:
> hi,
> i'm trying to write a replace statement and I'm having a problem.
> the string is
> "canon\tpowershot a290\t...."
> i want to replace every \t with a horizontal tab.
> i have it as
> str = replace(string, "\t", chr(11))
> this doesn't seem to work since I don't think i have the write ascii code
> for a horizontal tab.

The first hit on Google (ascii code tab) shows the following:

Name Char Dec Hex Description
____________________________________________
CR ^M 13 0D carriage return
LF ^J 10 0A line feed
TAB ^I 09 09 horizontal tab
SPACE 32 20 space
ESC ^[ 27 1B escape

11 is a vertical tab.