Problème code vba
Végéta84
Messages postés
2
Date d'inscription
Statut
Membre
Dernière intervention
-
Végéta84 Messages postés 2 Date d'inscription Statut Membre Dernière intervention -
Végéta84 Messages postés 2 Date d'inscription Statut Membre Dernière intervention -
Bonjour,
Je suis débutant en programation vba et je suis face à une erreur de compilation.
Voici mon code:
Private Sub ComboBox1_Change()
End Sub
Private Function Tarif(str_Typetransport As String)
If (str_Typetransport.Text = "Lent") Then Tarif.Value = 0
If (str_Typetransport.Text = "Urgent") Then Tarif.Value = 12
If (str_Typetransport.Text = "Porteur spécial") Then Tarif.Value = 23
End Function
Private Sub Bouton_Click(Tarif As object)
If (Nbcolis.Value < 5) Then Fraisexp.Caption = (Destination.Value + Tarif.Value) * Nbcolis.Value Else: Fraisexp.Caption = (Destination.Value + Tarif.Value) * Nbcolis.Value * 0.9
End Sub
Private Sub Fraisexp_Change()
End Sub
Private Sub TextBox1_Change()
End Sub
Private Sub TextBox3_Change()
End Sub
Private Sub Remise_Change()
End Sub
Private Sub Destination_Change()
End Sub
Private Sub Typetransport_Change()
End Sub
Toute aide est la bienvenue !!!!
merci
Je suis débutant en programation vba et je suis face à une erreur de compilation.
Voici mon code:
Private Sub ComboBox1_Change()
End Sub
Private Function Tarif(str_Typetransport As String)
If (str_Typetransport.Text = "Lent") Then Tarif.Value = 0
If (str_Typetransport.Text = "Urgent") Then Tarif.Value = 12
If (str_Typetransport.Text = "Porteur spécial") Then Tarif.Value = 23
End Function
Private Sub Bouton_Click(Tarif As object)
If (Nbcolis.Value < 5) Then Fraisexp.Caption = (Destination.Value + Tarif.Value) * Nbcolis.Value Else: Fraisexp.Caption = (Destination.Value + Tarif.Value) * Nbcolis.Value * 0.9
End Sub
Private Sub Fraisexp_Change()
End Sub
Private Sub TextBox1_Change()
End Sub
Private Sub TextBox3_Change()
End Sub
Private Sub Remise_Change()
End Sub
Private Sub Destination_Change()
End Sub
Private Sub Typetransport_Change()
End Sub
Toute aide est la bienvenue !!!!
merci
A voir également:
- Problème code vba
- Code ascii - Guide
- Code puk bloqué - Guide
- Comment déverrouiller un téléphone quand on a oublié le code - Guide
- Code activation windows 10 - Guide
- Code blocks - Télécharger - Langages
2 réponses
Private Sub Bouton_Click(Tarif As object)
If (Nbcolis.Value < 5) Then Fraisexp.Caption = (Destination.Value + Tarif.Value) * Nbcolis.Value Else: Fraisexp.Caption = (Destination.Value + Tarif.Value) * Nbcolis.Value * 0.9
End Sub
tin if? ias tu mis tout ton code?
normalement ton if devrai etre former comme ca
if (Nbcolis.Value < 5) Then
Fraisexp.Caption = (Destination.Value + Tarif.Value) * Nbcolis.Value
Else
Fraisexp.Caption = (Destination.Value + Tarif.Value) * Nbcolis.Value * 0.9
end if
If (Nbcolis.Value < 5) Then Fraisexp.Caption = (Destination.Value + Tarif.Value) * Nbcolis.Value Else: Fraisexp.Caption = (Destination.Value + Tarif.Value) * Nbcolis.Value * 0.9
End Sub
tin if? ias tu mis tout ton code?
normalement ton if devrai etre former comme ca
if (Nbcolis.Value < 5) Then
Fraisexp.Caption = (Destination.Value + Tarif.Value) * Nbcolis.Value
Else
Fraisexp.Caption = (Destination.Value + Tarif.Value) * Nbcolis.Value * 0.9
end if