Checkbox Control VB

Wahyu Raja Butar-Butar Reply 07:22
Screenshot






The Code



Private Sub cmdExit_Click()
    End
End Sub
___________________________________________________
Private Sub cmdShow_Click()
    Dim total As Integer
    total = 0
    tea = ""
    sandwitch = ""
    pizza = ""
    colddrinks = ""
    greentea = ""
    coffee = ""


    If chkTea.Value = 1 Then
        tea = " Tea,"
        total = total + 5
    End If

    If chkSandwich.Value = 1 Then
        sandwich = " Sandwich,"
        total = total + 50
    End If

    If chkPizza.Value = 1 Then
        pizza = " Pizza,"
        total = total + 50
    End If

    If chkColdDrinks.Value = 1 Then
        colddrinks = " Cold Drinks,"
        total = total + 6
    End If

    If chkGreenTea.Value = 1 Then
        greentea = " Green Tea,"
        total = total + 7
    End If

    If chkCoffee.Value = 1 Then
        coffee = " Coffee,"
        total = total + 9
    End If


    MsgBox "You have ordered " & tea & _
    sandwich & pizza & colddrinks & greentea & coffee & _
    " and the total price is $" & total, vbInformation, "Thanks"


End Sub
Source : http://www.vbtutes.com/2012/08/program-28-restuarant-order-1.html

Related Posts

Programming 7365659083323126719
Comments
0 Comments
Facebook Comments by Media Blogger

Post a Comment

Search

Google+ Followers

Popular Posts

Translate