>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.