You are on page 1of 4

promedio

Private Sub Label4_Click()



End Sub

Private Sub cmdlimpiar_Click()
txtTI.Text = ""
txtDH.Text = ""
txtE.Text = ""
lblT.Caption = ""

End Sub

Private Sub cmdpromedio_Click()
Dim TI As Double, Dh As Double, E As Double, PTI As Double, PDH As Double
Dim PE As Double, t As Double
TI = Val(txtTI.Text)
Dh = Val(txtDH.Text)
E = Val(txtE.Text)
PTI = TI * 0.25

PDH = Dh * 0.05

PE = E * 0.7
t = PTI + PDH + PE
lblT.Caption = "la nota final es:" & t







End Sub

Private Sub cmdsalir_Click()
Dim resp As String
resp = MsgBox("desea salir del programa", vbYesNo, "salir")
If resp = vbYes Then
End
Else

txtTI.Text = ""
txtDH.Text = ""
txtE.Text = ""
lblT.Caption = ""
txtTI.SetFocus

End If

End Sub

Descuento
Private Sub cmdlimpiar_Click()
txtart.Text = ""
txtcant.Text = ""
txtprecio.Text = ""
lblmonto.Caption = ""

End Sub

Private Sub cmdmonto_Click()
Dim art As String, cant As Integer, precio As Currency, monto As Currency
Dim descuento As Double
art = txtart.Text
cant = Val(txtcant.Text)
precio = Val(txtprecio.Text)
monto = cant * precio
If monto > 100 Then
descuento = monto * 0.08

monto = monto - descuento




End If
lblmonto.Caption = "el monto a cancelar por la compra de " & cant & " " & art & " es " & monto




End Sub

Private Sub Label1_Click()

End Sub

Private Sub Label2_Click()

End Sub

Private Sub cmdsalir_Click()
End
End Sub

You might also like