Xtreme11
03-11-2011, 12:05 AM
Dim dblOperand1 As Double
Dim dblOperand2 As Double
Dim dblResult As Double
If dblOperand2 = 0 Then
MsgBox "The answer is undefined", vbCritical, "Error"
cmdClear_Click
Else: dblResult = dblOperand2 / 0
mstrPendingClear = "Yes"
txtCurrentValue.Value = dblResult
End If
updateTextboxes
End Sub
Is there something wrong in this procedure because I am able to use a provided "Checker" to check if I have certain steps written the right way. However, for this step I am getting "Last statement 1/0=RUNTIME ERROR!
This is for the square root button in the calculator.
Any help will be appreciated. Thanks
Dim dblOperand2 As Double
Dim dblResult As Double
If dblOperand2 = 0 Then
MsgBox "The answer is undefined", vbCritical, "Error"
cmdClear_Click
Else: dblResult = dblOperand2 / 0
mstrPendingClear = "Yes"
txtCurrentValue.Value = dblResult
End If
updateTextboxes
End Sub
Is there something wrong in this procedure because I am able to use a provided "Checker" to check if I have certain steps written the right way. However, for this step I am getting "Last statement 1/0=RUNTIME ERROR!
This is for the square root button in the calculator.
Any help will be appreciated. Thanks