Checkbox Control VB

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

Comments
0 Comments
Facebook Comments by Media Blogger

Post a Comment

O.O
-"-
(*.*)
*-*
="=
o"o?
(T_T)
(--;)
:^D^:
:@v@:
-.-b
(==)
(oxO)
o(O
(--)z
(*0*)
^q^
(o_o)
*_`
**"

Newer Post: VBKey Codes
Older Post:

Search

Ikuti Channel Youtube Aku Yaa.. Jangan Lupa di subscribe. Terima kasih.

Popular Posts

Translate