Private Sub margeM_Change()
'--------------------------------------------------
'Dim echo As Integer
Dim chefval As Double
Dim compagnonsval As Double
Dim total As Double
Set salaireChef = Sheets("donnees_employes").Range("G4")
Set salaireComp = Sheets("donnees_employes").Range("H4")
chefval = Val(chef.Value)
compagnonsval = Val(compagnons.Value)
total = chefval + compagnonsval
UserForm1.equipe.Caption = (chefval * salaireChef.Value + compagnonsval * salaireComp.Value) / total
End Sub