Thread: food menu
View Single Post
 
Old 10-22-2013, 03:41 PM
Pyromark Pyromark is offline
Newcomer
 
Join Date: Oct 2013
Posts: 9
Default food menu

Im making a food menu program for class. i have 3 buttons for the sizes of pizza. When i click small. label on the right comes up with 1 and then puts 6.00 in subtotal box. when i click medium, it doesn't add to the 6.00 it just puts its own price as 9.00. how do i add them all together.
Public Class Form1

Code:
Private Sub btnSmall_Click(sender As Object, e As EventArgs) Handles btnSmall.Click lblSmall.Text = Val(lblSmall.Text) + 1 Dim declblSubtotal As Integer declblSubtotal = Val(lblSmall.Text) * 6 lblSubtotal.Text = declblSubtotal.ToString("c") End Sub Private Sub btnMedium_Click(sender As Object, e As EventArgs) Handles btnMedium.Click lblMedium.Text = Val(lblMedium.Text) + 1 Dim declblSubtotal As Integer declblSubtotal = Val(lblMedium.Text) * 9 lblSubtotal.Text = declblSubtotal.ToString("c") End Sub

Last edited by Gruff; 10-22-2013 at 05:42 PM.
Reply With Quote