Public curval As Double
Public preval As Double
Public choice As String
Public result As Double
Private Sub cmd_Click(Index As Integer)
Text1.Text = Text1.Text &cmd(Index).Caption
curval = Val(Text1.Text)
End Sub
Private Sub cmdac_Click()
curval = preval = 0
Text1.Text = ""
End Sub
Private Sub cmddiv_Click()
Text1.Text = ""
preval = curval
curval = 0
choice = "/"
End Sub
Private Sub cmdequal_Click()
Select Case choice
Case "+"
result = preval + curval
Text1.Text = Str(result)
Case "-"
result = preval - curval
Text1.Text = Str(result)
Case "*"
result = preval * curval
Text1.Text = Str(result)
Case "/"
result = preval / curval
Text1.Text = Str(result)
End Select
curval = result
End Sub
Private Sub CMDEXIT_Click()
End
End Sub
Private Sub cmdminus_Click()
Text1.Text = ""
preval = curval
curval = 0
choice = "-"
End Sub
Private Sub cmdmul_Click()
Text1.Text = ""
preval = curval
curval = 0
choice = "*"
End Sub
Private Sub cmdnegative_Click()
curval = -curval
Text1.Text = Str(curval)
End Sub
Private Sub cmdplus_Click()
Text1.Text = ""
preval = curval
curval = 0
choice = "+"
End Sub
Form:
Awesome post. I visit first time on your web site and appreciate you to maintain the nice site. I’ll be a frequent visitor for a long time. We are the top provider of Digital Signature Certificate in Delhi and all over India.
ReplyDeleteNice blog. I really loved reading through this blog. We are the finest provider of Digital signature certificate in Delhi and all over India.
ReplyDelete