Thank you Lavedas, but Bob's solution here is better because it will be
easyer to wright rules like
and([AAA]=[AAB],[BBA]<[BBB]) then
and(""" & AAA & """=""" & AAB & """, """ & BBA & """<""" & BBB & """)
Could you help me with some new problem?
instr([AAA],[AAB])=0 after parsing it becomes
instr("8o6t56-a","8o6t56-b")=0 because AAA and AAB are strings.
Problem is that
Evaluate("instr("8o6t56-a","8o6t56-b")=0") returnes compile error
Is there any solution?
"T Lavedas" wrote:
On May 22, 2:35 pm, Gvaram wrote:
Thank you very much Bob
"Bob Phillips" wrote:
The problem it is not CCA as a variable, but as part of teh string, as is
the " and the &.
I beg to differ with Mr. Phillips original assessment. I believe the
problem was with the string stored in the database. This worked for
me ...
Sub test()
CCA = 22
CCB = 1200
hhhh = "AND(" & CCA & "<30, " & CCB & "800)"
MsgBox Evaluate(hhhh)
End Sub
Note that all I did was add a leading and a trailing double quote to
the 'rule' string.
Tom Lavedas
===========
http://members.cox.net/tglbatch/wsh/