Bonjour tout le monde,
J'ai un souci avec un code, il recopie des lignes saisie dans mon formulaire et les intègres à ma feuille
mais une ligne ne se remplie pas:
Il s'agit de celle
, qui correspond à la ligne 4 de mon USF içi en PJ
En PJ une image de mon userform, le fichier est beaucoup trop lourd et trop de données confidentielles pour le mettre sur le forum..
Merci d'avance.
J'ai un souci avec un code, il recopie des lignes saisie dans mon formulaire et les intègres à ma feuille
mais une ligne ne se remplie pas:
Code:
Private Sub suivant2_Click()
Dim NLig As Long
With Sheets("DONNEES")
NLig = .Range("A" & Rows.Count).End(xlUp).Offset(1, 0).Row
.Range("A" & NLig) = ComboBox13.Value
.Range("b" & NLig) = TextBox21.Value
If ComboBox13.Value = "" Then
Else: .Range("c" & NLig) = TextBox22.Value
End If
With Sheets("DONNEES")
NLig = .Range("A" & Rows.Count).End(xlUp).Offset(1, 0).Row
.Range("A" & NLig) = ComboBox1.Value
.Range("b" & NLig) = TextBox18.Value
If ComboBox1.Value = "" Then
Else: .Range("c" & NLig) = TextBox22.Value
End If
With Sheets("DONNEES")
NLig = .Range("A" & Rows.Count).End(xlUp).Offset(1, 0).Row
.Range("A" & NLig) = ComboBox2.Value
.Range("b" & NLig) = TextBox15.Value
If ComboBox2.Value = "" Then
Else: .Range("c" & NLig) = TextBox22.Value
End If
With Sheets("DONNEES")
NLig = .Range("A" & Rows.Count).End(xlUp).Offset(1, 0).Row
.Range("A" & NLig) = ComboBox14.Value
.Range("b" & NLig) = TextBox23.Value
If ComboBox14.Value = "" Then
Else: .Range("c" & NLig) = TextBox22.Value
End If
With Sheets("DONNEES")
.Range("A" & NLig) = ComboBox4.Value
.Range("b" & NLig) = TextBox9.Value
If ComboBox4.Value = "" Then
Else: .Range("c" & NLig) = TextBox22.Value
End If
With Sheets("DONNEES")
NLig = .Range("A" & Rows.Count).End(xlUp).Offset(1, 0).Row
.Range("A" & NLig) = ComboBox5.Value
.Range("b" & NLig) = TextBox6.Value
If ComboBox5.Value = "" Then
Else: .Range("c" & NLig) = TextBox22.Value
End If
With Sheets("DONNEES")
NLig = .Range("A" & Rows.Count).End(xlUp).Offset(1, 0).Row
.Range("A" & NLig) = ComboBox6.Value
.Range("b" & NLig) = TextBox3.Value
If ComboBox6.Value = "" Then
Else: .Range("c" & NLig) = TextBox22.Value
End If
End With
End With
End With
End With
End With
End With
End With
Il s'agit de celle
HTML:
]With Sheets("DONNEES")
NLig = .Range("A" & Rows.Count).End(xlUp).Offset(1, 0).Row
.Range("A" & NLig) = ComboBox14.Value
.Range("b" & NLig) = TextBox23.Value
If ComboBox14.Value = "" Then
Else: .Range("c" & NLig) = TextBox22.Value
End If
En PJ une image de mon userform, le fichier est beaucoup trop lourd et trop de données confidentielles pour le mettre sur le forum..
Merci d'avance.
Pièces jointes
Dernière édition: