Using a chr character code higher than 255?

J

JBHansen

I'm trying to use the replace command to pull out all the horizontal ellipsis
characters [chr(8230), or '...'] from a string, but the chr() command won't
accept anything higher than 255. I likewise can't search for three dots
because they've already been converted into a single character.

I'd rather not have to replace them all manually, although that is an
option. Is there a <smarter> way to do this?

JBHansen
 
J

JBHansen

Well, to report back, I just copy-pasted the actual '…' character into VBA
and it seems to work fine. I had assumed that wouldn't work, but so far so
good.
 
J

John Spencer

Chr(133) is usually the ellipsis character.

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
Well, to report back, I just copy-pasted the actual '…' character into VBA
and it seems to work fine. I had assumed that wouldn't work, but so far so
good.

JBHansen said:
I'm trying to use the replace command to pull out all the horizontal ellipsis
characters [chr(8230), or '...'] from a string, but the chr() command won't
accept anything higher than 255. I likewise can't search for three dots
because they've already been converted into a single character.

I'd rather not have to replace them all manually, although that is an
option. Is there a <smarter> way to do this?

JBHansen
 
D

Dirk Goldgar

JBHansen said:
I'm trying to use the replace command to pull out all the horizontal
ellipsis
characters [chr(8230), or '...'] from a string, but the chr() command
won't
accept anything higher than 255. I likewise can't search for three dots
because they've already been converted into a single character.

I'd rather not have to replace them all manually, although that is an
option. Is there a <smarter> way to do this?


Try the ChrW function.
 
J

John W. Vinson

Oops,

Chr(133) is not a hyphen. Not sure what it is, e.g.
? asc("…")
133
? chr(133)

It may print as a hyphen or as an underscore in some fonts. Fonts aren't all
that consistant above the ASCII standard set.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top