0

I'm writing a code to build a advance calculator, I got everything BESIDES putting a message error that says: "Cannot divide by zero." in the dividebutton I just have a really hard time coding a message error...

Thanks!

4
Contributors
5
Replies
28
Views
4 Years
Discussion Span
Last Post by Luc001
0
    MsgBox("Cannot divide by zero", MsgBoxStyle.Critical)

Edited by xLuFeT

1

Or you can test the operands before you do the divide to see if the denominator is zero.

Votes + Comments
Life can be really simple.
0

Hi Jockster,

Glad to help.
Mark your thread as resolved, so it can help others.

Grtz,

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.