Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
VB6 Project 1 - Calculate this.
#8
KruSuPhy Wrote:http://www.megaupload.com/?d=V4K3VJAK
Eh. changed it a little bit.
Fixed the Divide by zero error I'm pretty sure.
I think Type mismatch is gone, too.

I still get the divide by zero error.
Code:
Case DIVISION
            If CDbl(Val(frmCalculator.txtDisplay.Text))  0 Then
                frmCalculator.txtDisplay.Text = TempValue / CDbl(Val(frmCalculator.txtDisplay.Text))
            Else
                'error trap method
            End If

it seems you could trap the error right in the case statement here. I looked at your code for a bit but did not see where you were trying to trap it before.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)