Nonbreaking space as a constant

B

Bear

How can I specify a nonbreaking space in a constant? I'd like to accomplish:

Const strColon As String = ":" & Chr(160)

But one can't use the Chr function when dimensioning. The higher idea is to
isolate the delimiter used at the beginning of the code for easier
maintenance.

Bear
 
H

Helmut Weber

Hi Bear,

just type it in the editor,
numlock on, alt 0160

Const strColon As String = ": "
MsgBox Asc(Right(strColon, 1)) ' 160


--

Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Vista Small Business, Office XP
 
B

Bear

Helmut:

Thanks! How simple -- but how potentially deceptive. I'm going to have to
comment that to remember that it's not a space.

Bear
 

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