home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form frmCoins
- Caption = "Coins"
- ClientHeight = 1125
- ClientLeft = 1290
- ClientTop = 1665
- ClientWidth = 3450
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- LinkTopic = "Form1"
- PaletteMode = 1 'UseZOrder
- ScaleHeight = 1125
- ScaleWidth = 3450
- Begin VB.PictureBox picValue
- Height = 255
- Left = 120
- ScaleHeight = 195
- ScaleWidth = 3195
- TabIndex = 1
- Top = 720
- Width = 3255
- End
- Begin VB.CommandButton cmdAnalyze
- Caption = "Analyze Change"
- Height = 495
- Left = 840
- TabIndex = 0
- Top = 120
- Width = 1815
- End
- Attribute VB_Name = "frmCoins"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub cmdAnalyze_Click()
- Dim numCoins As Integer, sum As Single, value As Single
- Open App.Path & "\COINS.TXT" For Input As #1
- numCoins = 0
- sum = 0
- Do While Not EOF(1)
- Input #1, value
- numCoins = numCoins + 1
- sum = sum + value
- Loop
- picValue.Cls
- picValue.Print "The value of the"; numCoins; "coins is"; sum; "cents."
- Close #1
- End Sub
-