Bonsoir,
j'aimerai interdire toutes les extentions dans une TextBox, sauf ".db"
J'ai un problême puisque si je mets ".db123cc" il va l'accepter... parce qu'il reconnait le ".db" du début !!
Quelqu'un voit le souci?
Merci d'avance,
Baptiste
j'aimerai interdire toutes les extentions dans une TextBox, sauf ".db"
J'ai un problême puisque si je mets ".db123cc" il va l'accepter... parce qu'il reconnait le ".db" du début !!
Quelqu'un voit le souci?
Code:
Private Sub Txt_EqType_Exit(ByVal Cancel As MSForms.ReturnBoolean)
Dim strChaine As String
Dim intCar As Integer
'Cannot contain the extentions xls or xml
strChaine = Txt_EqType.Value
intCar = InStr(InStr(1, strChaine, ".db") + 3, strChaine, ".")
If intCar > 0 Then
strChaine = Mid(strChaine, 1, intCar - 1)
End If
Txt_EqType.Value = strChaine
End Sub
Merci d'avance,
Baptiste