kodakdave
04-16-2010, 07:55 AM
I have two macros, say a=100 and b=99. vbld_iif is used to compare them, as in
[ vbld_iif(Application.Macros(...)("a").Value >
Application.Macros(...)("b").Value, "true", "false")]
and because they are treated as strings this yields false when it shouldn't. I could check for mismatched string lengths and pad with zeroes, but I should not have to. Can I force the Value to be treated as a Number so the comparison works correctly?
[ vbld_iif(Application.Macros(...)("a").Value >
Application.Macros(...)("b").Value, "true", "false")]
and because they are treated as strings this yields false when it shouldn't. I could check for mismatched string lengths and pad with zeroes, but I should not have to. Can I force the Value to be treated as a Number so the comparison works correctly?