News:

Choose a design and let our professionals help you build a successful website   - ITAcumens

Main Menu

cmdEqual_Click ( ) event procedure

Started by sukishan, Jul 16, 2009, 02:55 PM

Previous topic - Next topic

sukishan

Private Sub cmdEqual_Click()

Select Case Choice

Case "+"
Result = Previous + Current
txtDisplay.Text = Result
Case "-"
Result = Previous - Current
txtDisplay.Text = Result
Case "*"
Result = Previous * Current
txtDisplay.Text = Result
Case "/"
Result = Previous / Current
txtDisplay.Text = Result
End Select

Current = Result

End Sub

Save and run the project. On clicking digits of user's choice and an operator button, the output appears.
A good beginning makes a good ending