program in visual basic to prepare invoice of hotel.

Private Sub Combo1_Click()
If Combo1.Text = "DOSA" Then
Text5.Text = 45
ElseIf Combo1.Text = "SAMBHAR-WADA" Then
Text5.Text = 50
Else: Combo1.Text = "SAMOSA"
Text5.Text = 20
End If
End Sub


Private Sub Command1_Click()
Text4.Text = Val(Text3.Text) + Val(Text7.Text)
Text8.Text = Val(Text4.Text) * 0.05
Text2.Text = Val(Text4.Text) + Val(Text8.Text)
End Sub

Private Sub Command2_Click()
End
End Sub

Private Sub Form_Load()
List1.AddItem "DELUX"
List1.AddItem "AC"
List1.AddItem "AC SUIT"

Combo1.AddItem "DOSA"
Combo1.AddItem "SAMBHAR-WADA"
Combo1.AddItem "SAMOSA"
End Sub
Private Sub List1_Click()
If List1.Text = "DELUX" Then
Text3.Text = 500
ElseIf List1.Text = "AC" Then
Text3.Text = 1000
ElseIf List1.Text = "AC SUIT" Then
Text3.Text = 2000
Else: MsgBox "Please select room type"
End If
End Sub
Private Sub Text7_GotFocus()
Text7.Text = Val(Text5.Text) * Val(Text6.Text)
End Sub

No comments:

Post a Comment