Re : Limiter la saisie d'une combobox
re smotty, ça fonctionne pas chez moi le code complet
Private Sub ComboBox1_Change()
If Not IsNumeric(ComboBox1.Value) Then
saisie = Left(ComboBox1.Value, Len(ComboBox1.Value) - 1)
ComboBox1.Value = saisie
End If
Dim Lig As Integer
Lig = Me.ComboBox1.ListIndex
Me.TextBoxP1.Value = ShtC.Range("A" & 7 + Lig + 1).Value
'Me.TextBoxT1.Value = Me.TextBoxP1.Value * 0
Me.TextBoxQ2.Value = ShtC.Range("I6").Value
Me.TextBoxP2.Value = ShtC.Range("A" & 7 + Lig + 1).Value
Me.TextBoxT2.Value = Me.TextBoxQ2.Value * Me.TextBoxP2.Value
Me.TextBoxQ3.Value = ShtC.Range("J6").Value
Me.TextBoxP3.Value = ShtC.Range("A" & 7 + Lig + 1).Value
Me.TextBoxT3.Value = Me.TextBoxQ3.Value * Me.TextBoxP3.Value
Me.TextBoxP10.Value = Me.TextBoxP1.Value / 6.55957
TextBoxP10 = Format(TextBoxP10.Value, "#,##0.00")
Me.TextBoxP20.Value = Me.TextBoxP2.Value / 6.55957
TextBoxP20 = Format(TextBoxP20.Value, "#,##0.00")
Me.TextBoxP30.Value = Me.TextBoxP3.Value / 6.55957
TextBoxP30 = Format(TextBoxP30.Value, "#,##0.00")
'Me.TextBoxT10.Value = Me.TextBoxT1.Value / 6.55957
'TextBoxT10 = Format(TextBoxT10.Value, "#,##0.00")
Me.TextBoxT20.Value = Me.TextBoxT2.Value / 6.55957
TextBoxT20 = Format(TextBoxT20.Value, "#,##0.00")
Me.TextBoxT30.Value = Me.TextBoxT3.Value / 6.55957
TextBoxT30 = Format(TextBoxT30.Value, "#,##0.00")
Me.TextBoxM2.Value = ShtC.Range("B" & 7 + Lig + 1).Value
TextBoxM2 = Format(TextBoxM2.Value, "#,##0.00")
End Sub
merci géraldine