I'm trying to compile a list of Variables from a DB of stored formulas. Below is a basic 'if' statement with V(<VarName>) denoting the variables.
String to be parsed:
How can I loop through to parse the above string in order to store '# Diff Door Sizes' and 'Door 1 Count'.
Here's what I have so far:
Thanks for your time!
String to be parsed:
Code:
IF(V(# Diff Door Sizes)>0,V(Door 1 Count))
How can I loop through to parse the above string in order to store '# Diff Door Sizes' and 'Door 1 Count'.
Here's what I have so far:
Code:
Do While Not rst.EOF
Calc = rst![Calculation]
For Counter = 1 To Len(Calc)
'Count V's in formula
Next Counter
'for CounterB =1 to Number of v's
i = InStr(1, Calc, "V(", 1)
j = InStr(i, Calc, ")", 1)
'trim calc using i an j until no more 'V(' exist
'store varname
Next CounterB
rst.MoveNext
Loop
rst.Close
Thanks for your time!