My goal is to rerun the InputBox when it crashes and give the user another chance to give the right type of input. (Like it crashes, you get a msgbox where it says "sorry your entry is not available, please retry", and it would jump back to the InputBox.)
Test1:
qm = InputBox("Wie viele Quadrat Meter hat die Wohnung?" & vbLf & "Bitte geben sie die QM Zahl an.", Angabe)
If IsError(qm) Then GoTo Test1
qm is defined as an Integer, =0, and below there is a Select Case mutilple alternative which changes qm to a number from 1-600.
When I type in text like "Hey guys", Excel gives me error 13 (Runtime error 13': type mismatch).
That's why in VBA you can use the
Application.InputBoxwith a 4th parameterType. If you useType:=1then only Numeric values are allowd.Code: