Re: Does VBscript support " & _" for long strings?
- From: "Ed" <ed_millis@xxxxxxxxxxxxxxxxx>
- Date: Wed, 17 Jan 2007 09:20:02 -0700
Good thought, but in this case I just have one _really, really_ long string
of items to Set right at the beginning of the code. Then as I pick up text
into another string, I do an InStr to see if my text is in the collection.
Ed
"mayayana" <mayaXXyana1a@xxxxxxxxxxxxxxxx> wrote in message
news:DRrrh.15588$X72.303@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Another thought:
This is just a matter of taste, but personally
I think it's cleaner, safer and easier to read
if it's done as a multiple concatenation:
s = "abc" & vbcrlf
s = s & "def" & vbcrlf
s = s & "ghi"
etc...
Ah! Thank you - my Copy and Paste may have done me in, then. I willproblems..
look
for that.
Ed
"Alexander Mueller" <millerax@xxxxxxxxxxx> wrote in message
news:u2Ric8jOHHA.2312@xxxxxxxxxxxxxxxxxxxxxxx
Ed schrieb:
"Michael Harris (MVP)" <mikhar.at.mvps.dot.org> wrote in message
news:%23ssqL4cOHHA.140@xxxxxxxxxxxxxxxxxxxxxxx
Ed wrote:
I know in Word and Excel VBA macros, I can set a long string usingYes - _ as a line continuation character is supported in VBScript.
& vbCrLf & _
to continue the string on the next line. I seem to be getting an
error in a script using this. Then again, it may well be something
else. So I thought I'd check on this while I look over everything
else just to make sure this is okay in scripting.
Thanks.
Ed
Thanks, Michael. At least now I know to look elsewhere for my
8>0
Not that a trailing ' _' is legal in vb(a) but not in vbs.
msgbox "hello" _
MfG,
Alex
.
- Follow-Ups:
- Re: Does VBscript support " & _" for long strings?
- From: Bob Barrows [MVP]
- Re: Does VBscript support " & _" for long strings?
- References:
- Does VBscript support " & _" for long strings?
- From: Ed
- Re: Does VBscript support " & _" for long strings?
- From: Michael Harris \(MVP\)
- Re: Does VBscript support " & _" for long strings?
- From: Ed
- Re: Does VBscript support " & _" for long strings?
- From: Alexander Mueller
- Re: Does VBscript support " & _" for long strings?
- From: Ed
- Re: Does VBscript support " & _" for long strings?
- From: mayayana
- Does VBscript support " & _" for long strings?
- Prev by Date: Re: Does VBscript support " & _" for long strings?
- Next by Date: Re: Does VBscript support " & _" for long strings?
- Previous by thread: Re: Does VBscript support " & _" for long strings?
- Next by thread: Re: Does VBscript support " & _" for long strings?
- Index(es):
Relevant Pages
|