Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim money As String
GroupBox2.Visible = True
money = TextBox1.Text
TextBox2.Text = money \ 1000
money = money Mod 1000
TextBox3.Text = money \ 500
money = money Mod 500
TextBox4.Text = money \ 100
money = money Mod 100
TextBox5.Text = money \ 50
money = money Mod 50
TextBox6.Text = money \ 20
money = money Mod 20
TextBox7.Text = money \ 10
money = money Mod 10
TextBox8.Text = money \ 5
money = money Mod 5
TextBox9.Text = money \ 1
money = money Mod 1
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
TextBox8.Text = ""
TextBox9.Text = ""
Button1.Enabled = True
End Sub
End Class
Top |