Does anyone know of a way to convert a string to a variable?
Example:
Say I am row 5, column 1 of a datagrid.
When my user changes the text of (5,1) to "GST" using a combo box, I want to multiply the amount in (5,2) by 10 percent and put the product in (5,3).
I don't want to hardcode this, I'd rather to have it as one of the "properties" of (5,1).
So, the string that I would like to use as the property would be "3 = 2 * dGST"
In this scenario the "dGST" portion of the string would have to be converted/interpreted to a double (via a magical string converter) that holds the current GST rate (which would already be declared: Dim dGST as double).
I'd use some sort of parsing algorithm to pick up the alpha characters in any string.
(I'm not holding my breath though)
Thanks,
georg
Example:
Say I am row 5, column 1 of a datagrid.
When my user changes the text of (5,1) to "GST" using a combo box, I want to multiply the amount in (5,2) by 10 percent and put the product in (5,3).
I don't want to hardcode this, I'd rather to have it as one of the "properties" of (5,1).
So, the string that I would like to use as the property would be "3 = 2 * dGST"
In this scenario the "dGST" portion of the string would have to be converted/interpreted to a double (via a magical string converter) that holds the current GST rate (which would already be declared: Dim dGST as double).
I'd use some sort of parsing algorithm to pick up the alpha characters in any string.
(I'm not holding my breath though)
Thanks,
georg