Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Macro Substitution
Message
De
29/05/1998 18:05:02
 
 
À
22/05/1998 16:52:07
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00101311
Message ID:
00103270
Vues:
21
>Is there a way to do this in Visual Basic:
>
>You have to Variables Va and Vb
>Va=100
>Vb=20
>
>In your database you have formulas using this constants
>
>field1 = "Va*20/100"
>field2 = "(Va*20/100) + Vb"
>Field3 = "Field1 + 10"
>
>When you run your program you want to change the variables and save the result in another database
>
>R1 = (Field1) = 20
>R2 = (Field2) = 40
>R3 = (Field3) = 30

One big mistake in Visual Basic 5, there is no macro substitution - worst, no Evaluate() function. Macro substitution is kinda not suggested to use. However, an Evaluate() function is certainly a must in each language. You will find that function in several environment but not in Visual Basic.

However, there is a trick to do it with formulas. But, with formulas only.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform