- If you need clarification, ask it in the comment box above.
- Better answers use proper spelling and grammar.
- Provide details, support with references or personal experience.
Tell us some more! Your answer needs to include more details to help people.You can't post answers that contain an email address.Please enter a valid email address.The email address entered is already associated to an account.Login to postPlease use English characters only.
Tip: The max point reward for answering a question is 15.
You can purchase a wide variety of high quality Bissell replacement parts for your Bissell vacuum direct from Think Crucial with free shipping and an exclusive 10% coupon for Fixya.com readers, use code: FIXYA10
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
×