I am using a input box to ask quantity and saving it for a calculation. But i need to know how, what if the user clicks on cancel, how do I make the program end instead of giving an error message.

temp = msgbox("blah", vbYesNo, "blah2")
if temp = vbYes then
end
end if

this works with msgboxes but not with inputboxes, is there a solution????