Change :
If Posit > 19 Then
valeurtextbox = Mid(.Value, 6, 2) & Mid(.Value, 9, 3) & _
Mid(.Value, 13, 3) & Right(.Value, 4)
MsgBox valeurtextbox
End If
en :
If Posit > 19 Then
[A1]= Mid(.Value, 6, 2) & Mid(.Value, 9, 3) & _
Mid(.Value, 13, 3) & Right(.Value, 4)
End If
Change :
If Posit > 19 Then
valeurtextbox = Mid(.Value, 6, 2) & Mid(.Value, 9, 3) & _
Mid(.Value, 13, 3) & Right(.Value, 4)
MsgBox valeurtextbox
End If
en :
If Posit > 19 Then
[A1]= Mid(.Value, 6, 2) & Mid(.Value, 9, 3) & _
Mid(.Value, 13, 3) & Right(.Value, 4)
End If
Change :
If Posit > 19 Then
valeurtextbox = Mid(.Value, 6, 2) & Mid(.Value, 9, 3) & _
Mid(.Value, 13, 3) & Right(.Value, 4)
MsgBox valeurtextbox
End If
en :
If Posit > 19 Then
[A1]= Mid(.Value, 6, 2) & Mid(.Value, 9, 3) & _
Mid(.Value, 13, 3) & Right(.Value, 4)
End If
Bonsoir JB,
les touches Backspace, Gauche, Droite, Effacer, Insérer ne sont pas
gérées
et puis les entrées clavier se font tous par SHIFT+touche ou
ALT+touche
Pourquoi n'étend-on pas la saisie par toutes les touches ?
Merci.
Bonsoir JB,
les touches Backspace, Gauche, Droite, Effacer, Insérer ne sont pas
gérées
et puis les entrées clavier se font tous par SHIFT+touche ou
ALT+touche
Pourquoi n'étend-on pas la saisie par toutes les touches ?
Merci.
Bonsoir JB,
les touches Backspace, Gauche, Droite, Effacer, Insérer ne sont pas
gérées
et puis les entrées clavier se font tous par SHIFT+touche ou
ALT+touche
Pourquoi n'étend-on pas la saisie par toutes les touches ?
Merci.
Les flèches de déplacement droite et gauche sont gérées ainsi que
les chiffres du pavé numérique.
Sur l'exemple, il n'est pas nécessaire de gérer la touche
suppression.
http://cjoint.com/?jruEu0OQVb
Dim p
Dim masque
Private Sub TextBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger,
ByVal Shift As Integer)
'MsgBox KeyCode
If KeyCode = 8 Or KeyCode = 37 Then
KeyCode = 0
If p > 0 Then p = p - 1
If p = 2 Or p = 5 Then p = p - 1
End If
If KeyCode = 39 Then ' flèche droite
KeyCode = 0
p = p + 1
If p = 2 Or p = 5 Then p = p + 1
End If
If KeyCode = 46 Then KeyCode = 0 ' touche suppression
If Mid(masque, p + 1, 1) = "." Then
If Not (KeyCode >= 48 And KeyCode <= 58 Or KeyCode >= 96 And
KeyCode <= 106) Then KeyCode = 0
End If
TextBox1.SelStart = p
TextBox1.SelLength = 1
End Sub
Private Sub UserForm_Initialize()
masque = "../../.."
TextBox1 = masque
p = 0
TextBox1.SelStart = p
TextBox1.SelLength = 1
End Sub
Private Sub TextBox1_Change()
p = p + 1
If p = 2 Then p = 3
If p = 5 Then p = 6
TextBox1.SelStart = p
TextBox1.SelLength = 1
End Sub
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If Not IsDate(Me.TextBox1) Then
Cancel = True
End If
End Sub
Private Sub TextBox1_MouseDown(ByVal Button As Integer, ByVal Shift As
Integer, ByVal X As Single, ByVal Y As Single)
p = Me.TextBox1.SelStart
End Sub
JB
http://cjoint.com/?jruEu0OQVb
Les flèches de déplacement droite et gauche sont gérées ainsi que
les chiffres du pavé numérique.
Sur l'exemple, il n'est pas nécessaire de gérer la touche
suppression.
http://cjoint.com/?jruEu0OQVb
Dim p
Dim masque
Private Sub TextBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger,
ByVal Shift As Integer)
'MsgBox KeyCode
If KeyCode = 8 Or KeyCode = 37 Then
KeyCode = 0
If p > 0 Then p = p - 1
If p = 2 Or p = 5 Then p = p - 1
End If
If KeyCode = 39 Then ' flèche droite
KeyCode = 0
p = p + 1
If p = 2 Or p = 5 Then p = p + 1
End If
If KeyCode = 46 Then KeyCode = 0 ' touche suppression
If Mid(masque, p + 1, 1) = "." Then
If Not (KeyCode >= 48 And KeyCode <= 58 Or KeyCode >= 96 And
KeyCode <= 106) Then KeyCode = 0
End If
TextBox1.SelStart = p
TextBox1.SelLength = 1
End Sub
Private Sub UserForm_Initialize()
masque = "../../.."
TextBox1 = masque
p = 0
TextBox1.SelStart = p
TextBox1.SelLength = 1
End Sub
Private Sub TextBox1_Change()
p = p + 1
If p = 2 Then p = 3
If p = 5 Then p = 6
TextBox1.SelStart = p
TextBox1.SelLength = 1
End Sub
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If Not IsDate(Me.TextBox1) Then
Cancel = True
End If
End Sub
Private Sub TextBox1_MouseDown(ByVal Button As Integer, ByVal Shift As
Integer, ByVal X As Single, ByVal Y As Single)
p = Me.TextBox1.SelStart
End Sub
JB
http://cjoint.com/?jruEu0OQVb
Les flèches de déplacement droite et gauche sont gérées ainsi que
les chiffres du pavé numérique.
Sur l'exemple, il n'est pas nécessaire de gérer la touche
suppression.
http://cjoint.com/?jruEu0OQVb
Dim p
Dim masque
Private Sub TextBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger,
ByVal Shift As Integer)
'MsgBox KeyCode
If KeyCode = 8 Or KeyCode = 37 Then
KeyCode = 0
If p > 0 Then p = p - 1
If p = 2 Or p = 5 Then p = p - 1
End If
If KeyCode = 39 Then ' flèche droite
KeyCode = 0
p = p + 1
If p = 2 Or p = 5 Then p = p + 1
End If
If KeyCode = 46 Then KeyCode = 0 ' touche suppression
If Mid(masque, p + 1, 1) = "." Then
If Not (KeyCode >= 48 And KeyCode <= 58 Or KeyCode >= 96 And
KeyCode <= 106) Then KeyCode = 0
End If
TextBox1.SelStart = p
TextBox1.SelLength = 1
End Sub
Private Sub UserForm_Initialize()
masque = "../../.."
TextBox1 = masque
p = 0
TextBox1.SelStart = p
TextBox1.SelLength = 1
End Sub
Private Sub TextBox1_Change()
p = p + 1
If p = 2 Then p = 3
If p = 5 Then p = 6
TextBox1.SelStart = p
TextBox1.SelLength = 1
End Sub
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If Not IsDate(Me.TextBox1) Then
Cancel = True
End If
End Sub
Private Sub TextBox1_MouseDown(ByVal Button As Integer, ByVal Shift As
Integer, ByVal X As Single, ByVal Y As Single)
p = Me.TextBox1.SelStart
End Sub
JB
http://cjoint.com/?jruEu0OQVb
"Quand j'utilise la touche Backsapce pour une corriger une saisie, elle
efface tout même les barres obliques ...
---
Bonsoir.
C'est ce que j'écrivais :
C'est seulement, j'en suis conscient, une ébauche de solution. Reste à gérer
le plus difficile : les retours arrière de la saisie, les copier / Coll er
etc.
Daniel
"Quand j'utilise la touche Backsapce pour une corriger une saisie, elle
efface tout même les barres obliques ...
---
Bonsoir.
C'est ce que j'écrivais :
C'est seulement, j'en suis conscient, une ébauche de solution. Reste à gérer
le plus difficile : les retours arrière de la saisie, les copier / Coll er
etc.
Daniel
"Quand j'utilise la touche Backsapce pour une corriger une saisie, elle
efface tout même les barres obliques ...
---
Bonsoir.
C'est ce que j'écrivais :
C'est seulement, j'en suis conscient, une ébauche de solution. Reste à gérer
le plus difficile : les retours arrière de la saisie, les copier / Coll er
etc.
Daniel
Les flèches de déplacement droite et gauche sont gérées ainsi q ue
les chiffres du pavé numérique.
Sur l'exemple, il n'est pas nécessaire de gérer la touche
suppression.
http://cjoint.com/?jruEu0OQVb
Dim p
Dim masque
Private Sub TextBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger,
ByVal Shift As Integer)
'MsgBox KeyCode
If KeyCode = 8 Or KeyCode = 37 Then
KeyCode = 0
If p > 0 Then p = p - 1
If p = 2 Or p = 5 Then p = p - 1
End If
If KeyCode = 39 Then ' flèche droite
KeyCode = 0
p = p + 1
If p = 2 Or p = 5 Then p = p + 1
End If
If KeyCode = 46 Then KeyCode = 0 ' touche suppression
If Mid(masque, p + 1, 1) = "." Then
If Not (KeyCode >= 48 And KeyCode <= 58 Or KeyCode >= 96 And
KeyCode <= 106) Then KeyCode = 0
End If
TextBox1.SelStart = p
TextBox1.SelLength = 1
End Sub
Private Sub UserForm_Initialize()
masque = "../../.."
TextBox1 = masque
p = 0
TextBox1.SelStart = p
TextBox1.SelLength = 1
End Sub
Private Sub TextBox1_Change()
p = p + 1
If p = 2 Then p = 3
If p = 5 Then p = 6
TextBox1.SelStart = p
TextBox1.SelLength = 1
End Sub
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If Not IsDate(Me.TextBox1) Then
Cancel = True
End If
End Sub
Private Sub TextBox1_MouseDown(ByVal Button As Integer, ByVal Shift As
Integer, ByVal X As Single, ByVal Y As Single)
p = Me.TextBox1.SelStart
End Sub
JB
http://cjoint.com/?jruEu0OQVb
Ton exemple :
Masque de saisie pour date (déplacement avec flèches)
me convient mieux.
mais la saisie des lettres n'est pas acceptée, pourquoi ? et comment y
parvenir ?
J'ai ajouter cette ligne :
TextBox1.MaxLenght = 10
pour limterla saisie dans le TextBox1.
Encore grand merci pour tes meuilleurs exemples.
JB : T'as pas un site personnel ?
Les flèches de déplacement droite et gauche sont gérées ainsi q ue
les chiffres du pavé numérique.
Sur l'exemple, il n'est pas nécessaire de gérer la touche
suppression.
http://cjoint.com/?jruEu0OQVb
Dim p
Dim masque
Private Sub TextBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger,
ByVal Shift As Integer)
'MsgBox KeyCode
If KeyCode = 8 Or KeyCode = 37 Then
KeyCode = 0
If p > 0 Then p = p - 1
If p = 2 Or p = 5 Then p = p - 1
End If
If KeyCode = 39 Then ' flèche droite
KeyCode = 0
p = p + 1
If p = 2 Or p = 5 Then p = p + 1
End If
If KeyCode = 46 Then KeyCode = 0 ' touche suppression
If Mid(masque, p + 1, 1) = "." Then
If Not (KeyCode >= 48 And KeyCode <= 58 Or KeyCode >= 96 And
KeyCode <= 106) Then KeyCode = 0
End If
TextBox1.SelStart = p
TextBox1.SelLength = 1
End Sub
Private Sub UserForm_Initialize()
masque = "../../.."
TextBox1 = masque
p = 0
TextBox1.SelStart = p
TextBox1.SelLength = 1
End Sub
Private Sub TextBox1_Change()
p = p + 1
If p = 2 Then p = 3
If p = 5 Then p = 6
TextBox1.SelStart = p
TextBox1.SelLength = 1
End Sub
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If Not IsDate(Me.TextBox1) Then
Cancel = True
End If
End Sub
Private Sub TextBox1_MouseDown(ByVal Button As Integer, ByVal Shift As
Integer, ByVal X As Single, ByVal Y As Single)
p = Me.TextBox1.SelStart
End Sub
JB
http://cjoint.com/?jruEu0OQVb
Ton exemple :
Masque de saisie pour date (déplacement avec flèches)
me convient mieux.
mais la saisie des lettres n'est pas acceptée, pourquoi ? et comment y
parvenir ?
J'ai ajouter cette ligne :
TextBox1.MaxLenght = 10
pour limterla saisie dans le TextBox1.
Encore grand merci pour tes meuilleurs exemples.
JB : T'as pas un site personnel ?
Les flèches de déplacement droite et gauche sont gérées ainsi q ue
les chiffres du pavé numérique.
Sur l'exemple, il n'est pas nécessaire de gérer la touche
suppression.
http://cjoint.com/?jruEu0OQVb
Dim p
Dim masque
Private Sub TextBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger,
ByVal Shift As Integer)
'MsgBox KeyCode
If KeyCode = 8 Or KeyCode = 37 Then
KeyCode = 0
If p > 0 Then p = p - 1
If p = 2 Or p = 5 Then p = p - 1
End If
If KeyCode = 39 Then ' flèche droite
KeyCode = 0
p = p + 1
If p = 2 Or p = 5 Then p = p + 1
End If
If KeyCode = 46 Then KeyCode = 0 ' touche suppression
If Mid(masque, p + 1, 1) = "." Then
If Not (KeyCode >= 48 And KeyCode <= 58 Or KeyCode >= 96 And
KeyCode <= 106) Then KeyCode = 0
End If
TextBox1.SelStart = p
TextBox1.SelLength = 1
End Sub
Private Sub UserForm_Initialize()
masque = "../../.."
TextBox1 = masque
p = 0
TextBox1.SelStart = p
TextBox1.SelLength = 1
End Sub
Private Sub TextBox1_Change()
p = p + 1
If p = 2 Then p = 3
If p = 5 Then p = 6
TextBox1.SelStart = p
TextBox1.SelLength = 1
End Sub
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If Not IsDate(Me.TextBox1) Then
Cancel = True
End If
End Sub
Private Sub TextBox1_MouseDown(ByVal Button As Integer, ByVal Shift As
Integer, ByVal X As Single, ByVal Y As Single)
p = Me.TextBox1.SelStart
End Sub
JB
http://cjoint.com/?jruEu0OQVb
Ton exemple :
Masque de saisie pour date (déplacement avec flèches)
me convient mieux.
mais la saisie des lettres n'est pas acceptée, pourquoi ? et comment y
parvenir ?
J'ai ajouter cette ligne :
TextBox1.MaxLenght = 10
pour limterla saisie dans le TextBox1.
Encore grand merci pour tes meuilleurs exemples.
JB : T'as pas un site personnel ?
Les flèches de déplacement droite et gauche sont gérées ainsi q ue
les chiffres du pavé numérique.
Sur l'exemple, il n'est pas nécessaire de gérer la touche
suppression.
http://cjoint.com/?jruEu0OQVb
Dim p
Dim masque
Private Sub TextBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger,
ByVal Shift As Integer)
'MsgBox KeyCode
If KeyCode = 8 Or KeyCode = 37 Then
KeyCode = 0
If p > 0 Then p = p - 1
If p = 2 Or p = 5 Then p = p - 1
End If
If KeyCode = 39 Then ' flèche droite
KeyCode = 0
p = p + 1
If p = 2 Or p = 5 Then p = p + 1
End If
If KeyCode = 46 Then KeyCode = 0 ' touche suppression
If Mid(masque, p + 1, 1) = "." Then
If Not (KeyCode >= 48 And KeyCode <= 58 Or KeyCode >= 96 And
KeyCode <= 106) Then KeyCode = 0
End If
TextBox1.SelStart = p
TextBox1.SelLength = 1
End Sub
Private Sub UserForm_Initialize()
masque = "../../.."
TextBox1 = masque
p = 0
TextBox1.SelStart = p
TextBox1.SelLength = 1
End Sub
Private Sub TextBox1_Change()
p = p + 1
If p = 2 Then p = 3
If p = 5 Then p = 6
TextBox1.SelStart = p
TextBox1.SelLength = 1
End Sub
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If Not IsDate(Me.TextBox1) Then
Cancel = True
End If
End Sub
Private Sub TextBox1_MouseDown(ByVal Button As Integer, ByVal Shift As
Integer, ByVal X As Single, ByVal Y As Single)
p = Me.TextBox1.SelStart
End Sub
JB
http://cjoint.com/?jruEu0OQVb
Ton exemple :
Masque de saisie pour date (déplacement avec flèches)
me convient mieux.
mais la saisie des lettres n'est pas acceptée, pourquoi ? et comment y
parvenir ?
J'ai ajouter cette ligne :
TextBox1.MaxLenght = 10
pour limterla saisie dans le TextBox1.
Encore grand merci pour tes meuilleurs exemples.
JB : T'as pas un site personnel ?
Les flèches de déplacement droite et gauche sont gérées ainsi q ue
les chiffres du pavé numérique.
Sur l'exemple, il n'est pas nécessaire de gérer la touche
suppression.
http://cjoint.com/?jruEu0OQVb
Dim p
Dim masque
Private Sub TextBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger,
ByVal Shift As Integer)
'MsgBox KeyCode
If KeyCode = 8 Or KeyCode = 37 Then
KeyCode = 0
If p > 0 Then p = p - 1
If p = 2 Or p = 5 Then p = p - 1
End If
If KeyCode = 39 Then ' flèche droite
KeyCode = 0
p = p + 1
If p = 2 Or p = 5 Then p = p + 1
End If
If KeyCode = 46 Then KeyCode = 0 ' touche suppression
If Mid(masque, p + 1, 1) = "." Then
If Not (KeyCode >= 48 And KeyCode <= 58 Or KeyCode >= 96 And
KeyCode <= 106) Then KeyCode = 0
End If
TextBox1.SelStart = p
TextBox1.SelLength = 1
End Sub
Private Sub UserForm_Initialize()
masque = "../../.."
TextBox1 = masque
p = 0
TextBox1.SelStart = p
TextBox1.SelLength = 1
End Sub
Private Sub TextBox1_Change()
p = p + 1
If p = 2 Then p = 3
If p = 5 Then p = 6
TextBox1.SelStart = p
TextBox1.SelLength = 1
End Sub
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If Not IsDate(Me.TextBox1) Then
Cancel = True
End If
End Sub
Private Sub TextBox1_MouseDown(ByVal Button As Integer, ByVal Shift As
Integer, ByVal X As Single, ByVal Y As Single)
p = Me.TextBox1.SelStart
End Sub
JB
http://cjoint.com/?jruEu0OQVb
Ton exemple :
Masque de saisie pour date (déplacement avec flèches)
me convient mieux.
mais la saisie des lettres n'est pas acceptée, pourquoi ? et comment y
parvenir ?
J'ai ajouter cette ligne :
TextBox1.MaxLenght = 10
pour limterla saisie dans le TextBox1.
Encore grand merci pour tes meuilleurs exemples.
JB : T'as pas un site personnel ?
Les flèches de déplacement droite et gauche sont gérées ainsi q ue
les chiffres du pavé numérique.
Sur l'exemple, il n'est pas nécessaire de gérer la touche
suppression.
http://cjoint.com/?jruEu0OQVb
Dim p
Dim masque
Private Sub TextBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger,
ByVal Shift As Integer)
'MsgBox KeyCode
If KeyCode = 8 Or KeyCode = 37 Then
KeyCode = 0
If p > 0 Then p = p - 1
If p = 2 Or p = 5 Then p = p - 1
End If
If KeyCode = 39 Then ' flèche droite
KeyCode = 0
p = p + 1
If p = 2 Or p = 5 Then p = p + 1
End If
If KeyCode = 46 Then KeyCode = 0 ' touche suppression
If Mid(masque, p + 1, 1) = "." Then
If Not (KeyCode >= 48 And KeyCode <= 58 Or KeyCode >= 96 And
KeyCode <= 106) Then KeyCode = 0
End If
TextBox1.SelStart = p
TextBox1.SelLength = 1
End Sub
Private Sub UserForm_Initialize()
masque = "../../.."
TextBox1 = masque
p = 0
TextBox1.SelStart = p
TextBox1.SelLength = 1
End Sub
Private Sub TextBox1_Change()
p = p + 1
If p = 2 Then p = 3
If p = 5 Then p = 6
TextBox1.SelStart = p
TextBox1.SelLength = 1
End Sub
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If Not IsDate(Me.TextBox1) Then
Cancel = True
End If
End Sub
Private Sub TextBox1_MouseDown(ByVal Button As Integer, ByVal Shift As
Integer, ByVal X As Single, ByVal Y As Single)
p = Me.TextBox1.SelStart
End Sub
JB
http://cjoint.com/?jruEu0OQVb
Ton exemple :
Masque de saisie pour date (déplacement avec flèches)
me convient mieux.
mais la saisie des lettres n'est pas acceptée, pourquoi ? et comment y
parvenir ?
J'ai ajouter cette ligne :
TextBox1.MaxLenght = 10
pour limterla saisie dans le TextBox1.
Encore grand merci pour tes meuilleurs exemples.
JB : T'as pas un site personnel ?
Merci JB.
Je vais le testé ...
Merci JB.
Je vais le testé ...
Merci JB.
Je vais le testé ...