Elle te renvoie une valeur Vide ("")Sub textMonétaire_Change
textMonétaire = IIf(IsNumeric(Left(x, 1)), Format(Val(x), "0 €"), "")
Me.Txt_Doit.BackColor = IIf(CDbl(Txt_Doit.Value) > 0, &HEB, &HE0E0E0) 'coloration
Me.Txt_Doit.BackColor = Array(&HEB, &HE0E0E0)(Abs(CDbl(Txt_Doit) <= 0))
Bonjour patricktoulon,re
bonjour
juste en passant
Me.Txt_Doit.BackColor = Array(&HEB, &HE0E0E0)(Abs(CDbl(Txt_Doit) <= 0))
Private Sub textMonétaire_keypress(ByVal KeyAscii As MSForms.ReturnInteger)
If Len(textMonétaire) = 0 And Chr(KeyAscii) = "€" Then KeyAscii = 0: Exit Sub
KeyAscii = IIf(Not Chr(KeyAscii) Like "[0-9€.]", 0, KeyAscii)
End Sub
NomFeuille = "Feuil_groupe_" & NomCat
With Sheets("Données_ref").ListObjects("t_Catégories") 'selon la catégorie, on cherche les ages min et max qui serviront pour le filtre
Set trouve = .ListColumns("Catégorie").Range.Find(NomCat, lookat:=xlWhole)
AgeMin = trouve.Offset(0, 1)
AgeMax = trouve.Offset(0, 2)
End With
With Sheets("Inscriptions").ListObjects("t_Inscriptions") 'on applique le filtre
.Range.AutoFilter Field:=11, Criteria1:=">=" & AgeMin, Operator:=xlAnd, Criteria2:="<" & AgeMax
On Error GoTo fin 'dans le cas ou le filtre ne donne aucune ligne
Set zoneToCopy = .DataBodyRange.SpecialCells(xlCellTypeVisible)
End With