Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Build a sting
Message
 
To
06/06/2001 03:37:36
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00515595
Message ID:
00515643
Views:
13
>Hi All
>
>I am new to VBA, as I am a visual foxpro programmer.
>
>I am trying to write a string to a varible, but the string contains '"'
>
>ie
>
>Dim MyString as String
>MyString='this is a test to "test"'
>
>
>VBA does not seem to like this
>
>
>So my question is how do I make a string of a sentence that already contains '"'

You can double the character as in:
? "this is a test to ""test""
You can also concatenate the ASCII character as in:
MyString="this is a test to " & chr$(34) & "test" & chr$(34)
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Reply
Map
View

Click here to load this message in the networking platform