Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / December 2007

Tip: Looking for answers? Try searching our database.

Nonbreaking space as a constant

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bear - 07 Dec 2007 20:02 GMT
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

Signature

Windows XP, Word 2000

Helmut Weber - 07 Dec 2007 21:21 GMT
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
Bear - 07 Dec 2007 22:05 GMT
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

Signature

Windows XP, Word 2000

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.