Code Snippets

  

Visual Basic Source Code


Welcome to Dream.In.Code
Click Here
Getting VB Help is Easy!

Join 118,862 VB Programmers for FREE! Ask your question and get quick answers from experts. There are 1,690 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!




Calculator

it does calculations

Submitted By:
Actions:
Rating:
Views: 20,230

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


Add comment


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





Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month