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;
- Jul 20 Thu 2006 20:08
Even and Odd
close
全站熱搜
留言列表
發表留言