Code Snippets

  

Visual Basic Source Code


Welcome to Dream.In.Code
Become a VB Expert!

Join 149,103 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,523 people online right now. Registration is fast and FREE... Join Now!





Calculator

it does calculations

Submitted By:
Actions:
Rating:
Views: 23,525

Language: Visual Basic

Last Modified: October 11, 2005
Instructions: just copy and paste

Snippet


  1. Private Sub Command1_Click()
  2.  
  3. End Sub
  4.  
  5.  
  6.  
  7.  
  8. Private Sub Cmdcalculate_Click()
  9. Dim calculate As String
  10. Dim number As Single
  11.  
  12. Dim balance As Single
  13.  
  14.  
  15. amount = Txtnumber.Text
  16.  
  17. balance = 100
  18.  
  19. If amount > balance Then MsgBox " you have exceede you limit,"
  20. If amount < balance Then MsgBox " no money get a job ,"
  21. If amount <> balance Then MsgBox " new balance 100,"
  22. End Sub
  23.  
  24.  
  25. Private Sub Cmdclear_Click()
  26. Txtnumber.Text = ""
  27. End Sub
  28.  
  29.  

Copy & Paste


Comments


quangloc 2008-10-10 20:29:12

It is verry good code

cutiegirl 2008-12-11 19:16:48

give the codes of calculator?


Add comment


You must be registered and logged on to </dream.in.code> to leave comments.




Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month