new line

  • Thread starter Thread starter Shari
  • Start date Start date
S

Shari

Hello,

Is there a way to define a variable for Chr$(10) that I
could use throughout my VB code? It's not something I
NEED, it would just be nice if, in my code, I could
simply enter 'CR' every time I need to enter a new line
in a messagebox or email.

I tried defining a constant equal to Chr$(10), but it
didn't like that. I guess I could simply define it as a
variable in my individual subs, but I was really hoping I
could just define it once and be done with it....

Thanks for any insight!

-Shari
 
I assume 'vbCr' must be the predefined constant for the carriage return
character, Ch(13)?

Btw, thanks a lot for that, Frank. I'd been wondering in the back of my mind
somewhere if there were constants for line feed and carriage return for a
while. (Like nl in MASM.)
 
Hi
you can test which code they represent with the following in the VBA
immediate window
?Asc(vbCR)
 

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

Back
Top