Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding a variable to a string?
Message
 
À
13/07/2000 17:51:36
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00392098
Message ID:
00392128
Vues:
11
>How do you add a variable to a string that will be used in a command in VB?
>
>For instance if I had a text box where I put a value for the variable myTableName. I then want to add that result to a string. Something like.
>
>myString= "Create Table"(add myfile here) "(name text,name2 text);"
>
>I've tried &myTableName& and &myTableName and they do not work.
>
>Any help will be appreciated.
You need spaces surrounding the ampersand.
myString= "Create Table " & myTableName & " (name text,name2 text);"
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform