Bonjour tout le monde, j'ai un petit problème concernant une textbox dans une userform, il y a deux textbox qui alimente une autre feuille dans le meme classeur, la premiere textbox ça marche mais le second ne s'alimente pas ( c'est à dire quand je mets quelque chose dans le userform la cellule qui doit etre alimenter ne s'alimente pas). merci de votre aide
voici mon code :
Private Sub CommandButton1_Click()
Dim ws As Worksheet
Set ws = ThisWorkbook.Sheets("Liste")
With ws
'Find the next empty row in Range B
Dim nextRowB As Long
nextRowB = .Cells(.Rows.Count, "B").End(xlUp).Row + 1
'Find the next empty row in Range D
Dim nextRowD As Long
nextRowD = .Cells(.Rows.Count, "D").End(xlUp).Row + 1
'Insert the data from the userform into the next empty cells in Range B and Range D
.Cells(nextRowB, "B").Value = Me.txtB.Value
.Cells(nextRowD, "D").Value = Me.txtN.Value
End With
'Clear the data entry fields on the userform
Me.txtB.Value = ""
Me.txtN.Value = ""
End Sub
voici mon code :
Private Sub CommandButton1_Click()
Dim ws As Worksheet
Set ws = ThisWorkbook.Sheets("Liste")
With ws
'Find the next empty row in Range B
Dim nextRowB As Long
nextRowB = .Cells(.Rows.Count, "B").End(xlUp).Row + 1
'Find the next empty row in Range D
Dim nextRowD As Long
nextRowD = .Cells(.Rows.Count, "D").End(xlUp).Row + 1
'Insert the data from the userform into the next empty cells in Range B and Range D
.Cells(nextRowB, "B").Value = Me.txtB.Value
.Cells(nextRowD, "D").Value = Me.txtN.Value
End With
'Clear the data entry fields on the userform
Me.txtB.Value = ""
Me.txtN.Value = ""
End Sub