3 Replies Latest reply: Jul 23, 2012 10:18 AM by Celambarasan Adhimulam RSS

    Impossible Expression: Apparently "9 = 9" = False?!

      Hiya Guys,


      This is a good one!


      I am trying to evaluate if the Month selected is equal to the current month (7) + 2 (September).  In a macro I am (essentially) using the VBScript:



      If (ActiveDocument.Evaluate("GetFieldSelections(MonthNumber,',',12)") = (Month(Now())+2)) then ...


      My "IF" expression always returns "False".  However, if I use the same expression for a Text Object (ie: =(GetFieldSelections(DateCourse_MonthNumber,',',12) = (Month(Now()))+2)) then selecting Month 9 (September) will display "-1" (True).

      If anyone has any ideas please let me know - as, I am fairly sure, that "9" does in fact equal "9"...  :-)