About The Author

Bienvenidos espero sea de su agrado esta page, contiene programas con seriales, descarga directa etc.

Get The Latest News

recibe las nuevas por email

jueves, noviembre 20, 2008

problema de ventas

Private Sub cantidad_lostfocus(Index As Integer)

If precio(Index) = "" Then
    importe(Index) = ""
   
    Else
   
    If cantidad(Index) <> "" Then
        importe(Index) = precio(Index) * cantidad(Index)
       
    End If
    End If
   


End Sub

Private Sub Command1_Click()

total = 0
For i = 0 To 7
If importe(i) = "" Then
total = total + 0
Else
total = total + importe(i)
End If
Next i
Text1.Text = total

End Sub

Private Sub Command2_Click()
End

End Sub

Private Sub List1_Click()

If List1.Selected(List1.ListIndex) Then
    Select Case List1.ListIndex
   
    Case 0
   
        precio(0).Caption = Format(5, "fixed")
       
    Case 1
   
        precio(1).Caption = Format(4, "fixed")
       
    Case 2
   
        precio(2).Caption = Format(0.5, "fixed")
       
    Case 3
   
        precio(3).Caption = Format(1.5, "fixed")
       
    Case 4
   
        precio(4).Caption = Format(1, "fixed")
       
    Case 5
   
        precio(5).Caption = Format(2, "fixed")
   
    Case 6
   
        precio(6).Caption = Format(2.5, "fixed")
       
    Case 7
   
        precio(7).Caption = Format(3, "fixed")
       
    End Select
   
    Else
        precio(List1.ListIndex) = ""
        cantidad(List1.ListIndex) = ""
        importe(List1.ListIndex) = ""
       
    End If
   
End Sub

Private Sub Option1_Click(Index As Integer)

If Option1(0).Value = True Then
Option1(1).Value = False

Text2.Text = Text1.Text
Else
Option1(0).Value = False
Text2.Text = Text1.Text * 1.1
End If

End Sub

0 comentarios:

Publicar un comentario

deja un comentario en la entrada