Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Build a sting
Message
 
 
À
06/06/2001 03:37:36
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00515595
Message ID:
00517246
Vues:
17
>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

Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform