Re : userform problème de récupération de données
Bonjour et merci pour votre réponse j'ai changé les codes mais j'ai tellement fait de manip que j'ai du me mélanger les pinceaux. Je vous prie de bien vouloir m'en excuser. Je vous mets ci-joint une partie du code comme vous me l'avez demander. mes textbox se nomment heure_entree et heure_sortie.
Voici une partie de mon code dans Recherche :
Public index As Integer, MyBox
Private Sub CommandButton1_Click()
index = 6 'comment est initialisée cette variable ?
ActiveSheet.Cells(index, 6) = N1 & " " & L & " " & N2
N1 = ""
L = ""
N2 = ""
RECHERCHE.Hide
'ActiveSheet.Cells(index, 6) = TextBox6
TextBox12 = UCase(TextBox12)
End Sub
Private Sub ComboBox1_Change()
index = ComboBox1.ListIndex + 3
Frame1.Visible = True
On Error Resume Next
TextBox1 = Format(ActiveSheet.Cells(index, 1), ">")
TextBox2 = Format(ActiveSheet.Cells(index, 2), ">")
TextBox3 = Format(ActiveSheet.Cells(index, 3), ">")
TextBox4 = Format(ActiveSheet.Cells(index, 4), ">")
TextBox5 = Format(ActiveSheet.Cells(index, 5), ">")
HEURE_ENTREE = Format(ActiveSheet.Cells(index, 6), "HH:MM") 'à modifier comme ceçi
TextBox7 = Format(ActiveSheet.Cells(index, 7), ">")
HEURE_SORTIE = Format(ActiveSheet.Cells(index, 8), "HH:MM") 'à modifier comme ceçi
TextBox9 = Format(ActiveSheet.Cells(index, 9), ">")
TextBox10 = Format(ActiveSheet.Cells(index, 10), ">")
TextBox11 = Format(ActiveSheet.Cells(index, 11), ">")
TextBox12 = Format(ActiveSheet.Cells(index, 12), ">")
End Sub
Private Sub Frame1_Click()
TextBox12 = UCase(TextBox12)
End Sub
Private Sub HEURE_ENTREE_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Dim texte As String
texte = TextBox6
Select Case Len(texte)
Case 2, 5
TextBox6 = texte & ":"
If Not Chr(KeyAscii) Like "#" Then KeyAscii = "0"
End Select
End Sub
Private Sub HEURE_SORTIE_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Dim texte As String
texte = TextBox8
Select Case Len(texte)
Case 2, 5
TextBox8 = texte & ":"
If Not Chr(KeyAscii) Like "#" Then KeyAscii = "0"
End Select
End Sub
et mon code de ma feuille "service_general
Private Sub cmdRechercher_Modifier_Click()
RechModif.Show
End Sub
Private Sub CommandButton1_Click()
Unload RECHERCHE
RECHERCHE.Show
End Sub
En espérant que vous puissiez m'aider merci pour votre patience.
tallia.