title: Visual Basic 6.0 Program Exercise/Program
body: <p>So I started teaching myself Visual Basic not too long ago and picked up this handy book at a garage sale. "Visual Basic 6.0 Enhanced Edition" is the name to be exact. Anyways I've been taking it exercise by exercise. Well hence the horrible instructions in this book it's quite an easy programming language. I've come to a pain in the ass exercise though. I really just don't understand what they're saying. If somebody could code this out for me or throw me in some direction that would be great! I'm at a loss so thanks guys... Anywho-- here's the prompt:</p>
  
  <p><b> "Lesson C Tutorial 3 Exercise 6"</p>
  
  <p>In this Exercise you will design and create an application of your own.</p>
  
  <p>Scenario: The principal of Hinsbrook High School would like you to create an application that will help students, who are in grades 1-6, learn how to make change. The application should allow the student to enter the amount the customer owes and the amount of money the customer paid. The application should calculate the amount of change, as well as how many dollars, quarters, dimes, nickels, and pennies to return to the customer. For now, you do not have to worry about the situation where the price is greater than what the customer pays. You can always assume that the customer paid either the exact amount or more than the exact amount. </p>
  
  <p>a. Read the Note at the beginning of the exercise section. Although the design of the application is up to you, you must include a Calculate Change button, which uses the InputBox function to prompt the user for the amount due and the amount paid.The Calculate Change button will display the amount due, amount paid, change, number of dollars, number of quarters, number of dimes, number of nickels, and the number of pennies. Format the amount due, amount paid, and change to currency. You must also include a Print button that will print the user interface, and an Exit button that will end the application.</p>
  
  <p>b. The Print button should send the focus to the Clear Screen Button . The Clear Screen button should send the focus to the Calculate Change button.</p>
  
  <p>c.Save the form and the project to lc6Done.</p>
  
  <p>d. (SIMPLY EXPLAINS THE WAY TO DESIGN THE APP ALREADY DONE!)</p>
  
  <p>e. Save and run the application. Print the application three times, using the following test data:</p>
  
  <p>75.33 as the amount due and 80.00 as the amount paid
  39.67 as the amount due and 50.00 as the amount paid
  45.55 as the amount due and 45.55 as the amount paid</p>
  
  <p></b></p>
  
  <p>Here's the code I already have finished</p>
  
  <pre><code>Private Sub cmdClear_Click()
      Amountdue.Caption = ""
      AmountPaid.Caption = ""
      Change.Caption = ""
      Dimes.Caption = ""
      Dollars.Caption = ""
      lblChange.Caption = ""
      lblDimes.Caption = ""
      lblDollars.Caption = ""
      lblDue.Caption = ""
      lblNickels.Caption = ""
      lblPaid.Caption = ""
      lblPennies.Caption = ""
      lblQuarters.Caption = ""
      NameLabel.Caption = ""
      Nickels.Caption = ""
      Pennies.Caption = ""
      Quarters.Caption = ""
  End Sub
  
  Private Sub cmdPrint_Click()
      PrintForm
  End Sub
  
  Private Sub Form_Load()
      Top = (Screen.Height - Height) / 2
      Left = (Screen.Width - Width) / 2
  End Sub
  Private Sub cmdCalc_Click()
      Dim calcChange As Integer
      calcChange = Val(InputBox("Enter amount due and amount paid", "Calculate Change"))
  End Sub
  </code></pre>
  
  <p><b>A Screenshot of my form</b></p>
  
  <p><img src="https://i.stack.imgur.com/DPDLa.png" alt="enter image description here"></p>