50 likes | 156 Views
More Mathematical Operators Bake Sale Program. October 8, 2009. Open VB. Create the following form:. Double click the Calculate button and enter the following code: 'Calculate Total Sales lblTotalSales.Caption = Val(txtCookies.Text) _
E N D
More Mathematical OperatorsBake Sale Program October 8, 2009
Open VB. Create the following form:
Double click the Calculate button and enter the following code: 'Calculate Total Sales lblTotalSales.Caption = Val(txtCookies.Text) _ + Val(txtCakes.Text) + Val(txtPies.Text) + _ Val(txtMuffins.Text)
'Calculate Sales Percentages lblCookiesPerc.Caption= Fix(Val(txtCookies.Text) / _ Val(lblTotalSales.Caption) * 100) lblCakesPerc.Caption = Fix(Val(txtCakes.Text) / _ Val(lblTotalSales.Caption) * 100) lblPiesPerc.Caption = Fix(Val(txtPies.Text) / _ Val(lblTotalSales.Caption) * 100) lblMuffinsPerc.Caption = Fix(Val(txtMuffins.Text) / _ Val(lblTotalSales.Caption) * 100)
Save your work! • Run your program.....does it work? • I’ll walk around to check and give you credit. Have a great weekend! 3 day weekend.........