adammitchell23
Registered User.
- Local time
- Today, 20:35
- Joined
- Oct 30, 2017
- Messages
- 24
Hi all,
I'm trying to calculate the lowest common denominator between the values of two textboxes on a form, [malerats] and [femalerats].
I'm using a function called Denominator, below:
Can anyone tell me why this isn't working?
Apologies if this is a question which had been asked before; whenever I try to use search on this forum, Chrome has a temper tantrum. Weird.
Cheers,
Ad
I'm trying to calculate the lowest common denominator between the values of two textboxes on a form, [malerats] and [femalerats].
I'm using a function called Denominator, below:
Code:
Public Function Denominator(MaleRats As Long, FemaleRats As Long) As Long
While MaleRats <> FemaleRats
If MaleRats > FemaleRats Then
MaleRats = MaleRats - FemaleRats
Else: FemaleRats = FemaleRats - MaleRats
End If
Wend
RatRatio = MaleRats
End Function
Can anyone tell me why this isn't working?
Apologies if this is a question which had been asked before; whenever I try to use search on this forum, Chrome has a temper tantrum. Weird.
Cheers,
Ad