<div style='background-color: none transparent;'></div>

Pages

CALCULATOR

SCREENSHOT














































CODE

Private Sub cmdAdd_Click()
lblAnswer.Caption = Val(txtFn.Text) + Val(txtSn.Text)
End Sub

Private Sub cmdClear_Click()
txtFn.Text = ""
txtSn.Text = ""
lblAnswer = "0.00"
End Sub

Private Sub cmdCon_Click()
lblAnswer.Caption = txtFn.Text + txtSn.Text
End Sub

Private Sub cmdDiv_Click()
lblAnswer.Caption = Val(txtFn.Text) / Val(txtSn.Text)
End Sub

Private Sub cmdExit_Click()
If MsgBox("Are you sure you want to close My Calculator?", vbQuestion + vbYesNo,




CALCULATOR
"Close Applet") = vbYes Then
    End
Else
    txtFn.SetFocus
End If
End Sub

Private Sub cmdExp_Click()
lblAnswer.Caption = Val(txtFn.Text) ^ Val(txtSn.Text)
End Sub

Private Sub cmdInt_Click()
lblAnswer.Caption = Val(txtFn.Text) \ Val(txtSn.Text)
End Sub

Private Sub cmdMod_Click()
lblAnswer.Caption = Val(txtFn.Text) Mod Val(txtSn.Text)
End Sub

Private Sub cmdMul_Click()
lblAnswer.Caption = Val(txtFn.Text) * Val(txtSn.Text)
End Sub

Private Sub cmdSub_Click()
lblAnswer.Caption = Val(txtFn.Text) - Val(txtSn.Text)
End Sub

Private Sub textempty()
If txtFn.Text = "" And txtSn.Text = "" Then
    MsgBox "Empty Fields!", , "Text Empty"
    txtFn.SetFocus
    lblAnswer.Caption = "0.00"
End If
End Sub
Private Sub textnotnum()
If IsNumeric(txtFn.Text) = False Then
    MsgBox "Enter Number Only!", vbInformation, "Validation"
    txtFn.SetFocus
End If
End Sub
Share this article :

No comments :

Post a Comment

 
Copyright © 2011. datasavvy . All Rights Reserved
Company Info | Contact Us | Privacy policy | Term of use | Widget | Advertise with Us | Site map
Template Modify by Creating Website . Inpire by Darkmatter Rockettheme Proudly powered by Blogger