Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Build a sting
Message
From
08/06/2001 17:21:18
 
 
To
06/06/2001 03:37:36
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00515595
Message ID:
00517246
Views:
16
>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 '"'
Dim MyString as String
MyString= "this is a test to " & chr(34) & "test" & chr(34)
? MyString
'  Returns:
'  this is a test to "test"
:) btw chr(39) is the single quote
~Joe Johnston USA

"If ye love wealth better than liberty, the tranquility of servitude better than the animated contest of freedom, go home from us in peace. We ask not your counsel or arms. Crouch down and lick the hands which feed you. May your chains set lightly upon you, and may posterity forget that ye were our countrymen."
~Samuel Adams

Previous
Reply
Map
View

Click here to load this message in the networking platform