Here is one solution. You might consider adding more robust error handling.
if the decimal numbers passed to the div function are multiples i will be a non-zero number of that multiple otherwise i will be zero.
Dim i As Integer i = div(12, 0) If i = 0 Then 'not multiple ' do this Else ' is multiple ' do something else End If
Function div(ByVal numerator As Object, ByVal denominator As Object) As Integer
dim n , d decimal Dim result As Decimal Dim remainder As Decimal
If IsNumber(numerator) Is True _ And IsNumber(denominator) Is True Then If numerator <> 0 Then n = numerator d = denominator Else GoTo error1 End If Else GoTo error1 End If
result = Decimal.divide(n, d) remainder = Decimal.remainder(n, d)
If remainder = 0 Then div = result Else div = 0 End If
Exit Function
error1: msgbox("Numbers must be non-zero numerics", , "Multiple check error") div = 0
End Function
i need help getting into my computer i forgot my password, and this is a toshiba satillite with...
(More)
i need help getting into my computer i forgot my password, and this is a toshiba satillite with windows vista