Problem Using 'Mod'
Perhaps:
Dim dTest As Double
dTest = 16 * Controls("cboRevealH" & i).Value
If Abs(dTest - CInt(dTest)) 1e-10 Then MsgBox "Invalid"
which allows for some rounding error. Adjust to suit
In article ,
RyanH wrote:
Thanks for the reply Bernie, unfortunately that doesn't really do much for
me. Is there a function that would do this below?
16 * Val(controls("cboRevealH" & i)) - Int(16 * Val(controls("cboRevealH" &
i))) = 0
Basically multiple the number in the Combobox by 16 which will return the
total number of 16th's. If the result does not equal a whole number the
number should be considered invalid. It would be nice to have a neat
function for this, any ideas?
|