Answer on Question #63584 - Programming & Computer Science | Visual Basic
Public Class frmShopPrices
Dim I As Double
Private Sub btnCulc_Click(sender As Object, e As EventArgs) Handles btnCulc.Click
I = 0.25
txtPrice.Text = FormatCurrency(txtPrice.Text, 2)
For Each c As TextBox In discPrices.Controls.OfType(Of TextBox)
c.Text = FormatCurrency(((txtPrice.Text) - CDbl(txtPrice.Text) * I), 2)
I = I - 0.05
Next
End Sub
Private Sub btnClr_Click(sender As Object, e As EventArgs) Handles btnClr.Click
txtPrice.Text = ""
For Each c As TextBox In discPrices.Controls.OfType(Of TextBox)
c.Text = ""
Next
txtPrice.Focus()
End SubEnd Class
http://www.AssignmentExpert.com
Comments