LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 279
Default Excel 2003 VBA string literal help location

I run VBA in Microsoft Visual Basic 6.5.1053 from Microsoft Office Excel
2003 (11.8332.8333) SP3 from Windows Vista Business Service Pack 2.

1) What help topic specifies the rules for forming a VBA string literal?
AFAIK, these are something like: A string literal is a sequence of
characters, starting and ending with a quote, in which a quote is
represented by two quotes.
e.g. "Hello, World" which has the value Hello, World and
"""Hello, World""" which has the value "Hello, World".

I think that a string literal can't specify more than one line.
e.g. This is an error:
"Hello,
World".
Backslash is not an escape character.
e.g. The value of """Hello, \r\nWorld""" is "Hello, \r\nWorld".
If You want that vbCrLf is your friend.
e.g. """Hello, " & vbCrLf & "World""".

When I ask for help on string literal, I get a myriad of hits, none of
which seem relevant to my interest.

2) How is help data organised, physically? If I could grep (a UNIX text
search program) the text, I might get a pointer to the answer to 1)
above, and subsequent awkward help questions. I may be looking in the
wrong place for the answer to 1).

Microsoft has a VBA specification document.
<http://msdn.microsoft.com/en-us/library/dd361851%28v=prot.10%29.aspx
points to
<http://download.microsoft.com/downlo...af5-448b-907d-
13985accf53e/%5BMS-VBAL%5D.pdf
in which "3.3.4 String Tokens" contains the relevant information. (In
my time, I have read syntax descriptions and believe I understand the
slightly cryptic presentation.) Sadly, I interpret it to mean that
"Hello,
World" is a valid String Token. I can't insert such a token in code. ;)

Please note that my interest is in reading how to create valid string
literal in a help topic, rather than merely knowing how to construct a
string literal.
--
Walter Briscoe
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use CountIf for a literal string chadkwelch Excel Worksheet Functions 3 March 21st 10 03:45 AM
Excel 2003 - hyperlink to a location in the same file Silverstreak Excel Discussion (Misc queries) 1 June 30th 09 02:33 PM
Excel: Use pic location string to call up picuture in cell? vloh28 Excel Discussion (Misc queries) 1 October 30th 07 12:42 AM
Exctracting Literal Value From A String Variable rocketslinger[_6_] Excel Programming 3 March 8th 06 03:15 PM
Exctracting Literal Value From A String Variable rocketslinger[_5_] Excel Programming 0 March 8th 06 12:59 AM


All times are GMT +1. The time now is 03:02 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"