Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys,
I have written a macro to get the number of rows for a selected date range.
the macro part is given below
checkValue1 =ActiveDocument.Evaluate("count({$<TSR_FROM_DTTM_S_M_INTL={">=$(=Date_From_All) <=$(=Date_To_All)"}>} TSR_FROM_DTTM_S_M_INTL)")
Macro is failing saying that invalid character.
But when I put the same expression in text box ,its giving me expected result
I suspect double quotes in between the expression is causing the problem
Can anybody suggest the solution
Thanks in advance
will u share the QVW file. So that can have a check on that
The double quotes inside your set analysis caused the problem. It finishes the string. Then, you get an error.
Probably single quotes will make it a comment. So, you can try to use chr(34)
checkValue1 =ActiveDocument.Evaluate("count({$<TSR_FROM_DTTM_S_M_INTL={" & chr(34) & ">=$(=Date_From_All) <=$(=Date_To_All)" & chr(34) & "}>} TSR_FROM_DTTM_S_M_INTL)")
Rgds,