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:
00515643
Vues:
14
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform