close

IS there a keyword in Visual Basic that recognizes whether a number is odd or
even.

If you have Analysis Toolpak loaded and set a reference to it in VBA, then
ISODD() and ISEVEN() are available

--
Kind regards,

Niek Otten

quot;aftamathquot; gt; wrote in message
...
gt; IS there a keyword in Visual Basic that recognizes whether a number is odd
gt; or
gt; even.
You could 'roll your own'

Function test(num) As Boolean
test = (num Mod 2 = 0)
End Function

--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

quot;aftamathquot; gt; wrote in message
...
gt; IS there a keyword in Visual Basic that recognizes whether a number is odd
gt; or
gt; even.
Could you explain a little more on how to call these functions and an exampl
of code for them. How t oset a reference? Thanks in advance.

quot;Niek Ottenquot; wrote:

gt; If you have Analysis Toolpak loaded and set a reference to it in VBA, then
gt; ISODD() and ISEVEN() are available
gt;
gt; --
gt; Kind regards,
gt;
gt; Niek Otten
gt;
gt; quot;aftamathquot; gt; wrote in message
gt; ...
gt; gt; IS there a keyword in Visual Basic that recognizes whether a number is odd
gt; gt; or
gt; gt; even.
gt;
gt;
gt;

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()