PDA

View Full Version : modify a variable



sturner
2006-03-29, 04:15 PM
ok i am so close just need a bit of help. what i need to do is take a string and add to it. for example:
string value 345.00
what i want the new value to be 3+45.00
so i can pass it on to an attribute and have the final text on the screen = STA. 3+45.00
i have been looking and searching for days i know how to do it ih lisp but VBA is a new challange. any help would be great!

Opie
2006-03-29, 04:51 PM
Have you looked at the FORMAT function?

sturner
2006-03-29, 05:04 PM
had no idea, i'll look into it thanks!

Ed Jobe
2006-03-29, 05:23 PM
When you say "add", it appears that you really mean "concatenate". All you have to do is use the concatenation operator "&". Thus:

strStation = "45.00"
strPrefix = "STA 3 + "
strNewStation = strPrefix & strStation
or
strStation = "STA 3 + " & strStation