Bonsoir le forum,
Je suis en train de faire un fichier excel (ci - joint) et pour l'injection des données ça me met un message d'erreur :
Voici le code :
Private Sub CommandButton1_Click()
derligne = Sheets(Basededonnées).Range("A" & Rows.Count).End(xlUp).Row + 1 '-> ligne où il y a le problème
With Sheets(ws)
.Range("A" & derligne).Value = TextBox1
.Range("B" & derligne).Value = TextBox3
.Range("C" & derligne).Value = TextBox2
.Range("D" & derligne).Value = TextBox4
.Range("E" & derligne).Value = ComboBox1
.Range("F" & derligne).Value = ComboBox2
.Range("G" & derligne).Value = TextBox5
.Range("H" & derligne).Value = TextBox6
.Range("I" & derligne).Value = TextBox7
.Range("J" & derligne).Value = TextBox8
.Range("K" & derligne).Value = TextBox9
.Range("M" & derligne).Value = TextBox10
.Range("N" & derligne).Value = TextBox11
.Range("O" & derligne).Value = TextBox12
End With
With Sheets(basedesaisie)
TextBox1 = ""
TextBox2 = ""
TextBox3 = ""
TextBox4 = ""
TextBox5 = ""
TextBox6 = ""
TextBox7 = ""
TextBox8 = ""
TextBox9 = ""
TextBox10 = ""
TextBox11 = ""
TextBox12 = ""
ComboBox1 = ""
ComboBox2 = ""
End With
End Sub
Du coup, je ne sais pas comment régler ce problème, est - ce que vous savez où j'ai fait l'erreur pour que je puisse le corriger?
Cordialement
Praveena