vb special characters
Im not a vb programmer and im stuck with some simple problems, how do i print \" \n... with writeline
outputfile.WriteLine "membersingroup.vbs " & "\"" & Groupname & "\""
i''ve always done it this way, for example:
MsgBox Chr(34) & "test" & Chr(34) & vbCrLf & "test line 2"
where Chr(34) gives you a double quote and the vbCrLf gives you a carriage return linefeed.
MsgBox Chr(34) & "test" & Chr(34) & vbCrLf & "test line 2"
where Chr(34) gives you a double quote and the vbCrLf gives you a carriage return linefeed.
vbCrLf is good for line breaks. But for double quotes, just use "" -- that''s two double quotes in a row. Its much cleaner:
MsgBox "Your name is ""Joe"" isn''t it?"
MsgBox """Joe"" is your name isn''t it?"
MsgBox "Isn''t your name ""Joe?"""
All are valid in VB.
MsgBox "Your name is ""Joe"" isn''t it?"
MsgBox """Joe"" is your name isn''t it?"
MsgBox "Isn''t your name ""Joe?"""
All are valid in VB.
quote:Original post by ApochPiQ
vbCrLf is good for line breaks. But for double quotes, just use "" -- that''s two double quotes in a row. Its much cleaner:
MsgBox "Your name is ""Joe"" isn''t it?"
MsgBox """Joe"" is your name isn''t it?"
MsgBox "Isn''t your name ""Joe?"""
All are valid in VB.
are you absolutely certain about that? i no longer have VB installed or i''d check it out, but i used to use it a LOT, and i don''t think that is valid...
Yep, it is valid
"I woke up sweating and clutching my pillow. Thankfully the powerful and reassuring visage of Optimus Prime staring back at me from my pillow case served to ease my frayed nerves. Like the giant robotic father I never had he always knows just what to say" - Gabe, Penny-Arcade
Alexandre Moura
"I woke up sweating and clutching my pillow. Thankfully the powerful and reassuring visage of Optimus Prime staring back at me from my pillow case served to ease my frayed nerves. Like the giant robotic father I never had he always knows just what to say" - Gabe, Penny-Arcade
Alexandre Moura
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement