View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
GS[_2_] GS[_2_] is offline
external usenet poster
 
Posts: 3,514
Default Excel 2003 VBA string literal help location

Walter Briscoe submitted this idea :
In message of Sat, 12 Nov 2011 23:14:05 in
microsoft.public.excel.programming, joeu2004 writes
"Walter Briscoe" wrote:
If You want that vbCrLf is your friend.
e.g. """Hello, " & vbCrLf & "World""".


IMHO, it is better to use vbNewline. That represents CRLF on non-Mac
platforms, and just CR on Mac platforms.


That is a good point.
I should follow it as I tie my code to Windows without any benefit.


You can find this and other constants by putting "visual basic
contants" in the VBA help search field, then clicking on the link by
that name, then clicking on "miscellaneous contants".


Merci bien à Isabelle (Je n'ai pas de clavier français, mais il y a
toujours charmap. C'est charmap en français? )
[Thanks to Isabelle (I don't have a French keyboard, but there is always
charmap. Is charmap called charmap in French?)]

Thanks to joeu2004, too.

I want to find "Excel 2003 VBA string literal help location" as shown in
my subject. It is a particular question, which I extended to the
general, and I continue to wait for answers to my real questions.

My hypothesis is there is no Excel 2003 VBA string literal help. ;)


You'd probably get more success googling Classic VB forums. But
generally, strings can be as long as you want, with as many line feeds
as you need. Though, it makes more sense to store long strings in a
worksheet and just retrieve them for use with VBA. Otherwise, here's
some example of storing a long string in a constant...

Const sMY_STRING As String = "Here is an example of a long string" _
& " that can be wrapped on many lines." _
& vbLF & vbLF _
& "You could continue this indefinitely" _
& " for as many lines as you like!"

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc