Re: Odd or Even

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



One way:

Dim bEven As Boolean
bEven = variable Mod 2 = 0


Dim bOdd As Boolean
bOdd = variable Mod 2 = 1


In article <92BC9C24-8D9B-4873-9A04-BE085FA67FE0@xxxxxxxxxxxxx>,
"PraxisPete" <PraxisPete@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

> Hi Everybody
> I think this should be straight forward but brain is just not working today
> How can I use VBA code to determine if the contents of a varible is odd or
> even?
>
> Many thanks
.



Relevant Pages