J'ai fait ce code:
Je veux aller chercher le code précis que je veux modifié
Et l'information dans les textbox et combobox n'apparait pas.
On dirait que je ne fais pas référence à ma feuille.
Et le code de modification on dirait qu'il supprime le nom de mes colonnes....
Voir UserForm (modifier_luminaire)
'Recherche de code de produit
Private Sub CommandButton1_Click()
Dim no_colonne As Integer
no_colonne = ComboBox18.ListIndex + 2
With Sheets("Saisie")
TextBox13.Value = Cells(no_colonne, 13).Value
ComboBox17.Value = Cells(no_colonne, 22).Value
TextBox5.Value = Cells(no_colonne, 33).Value
ComboBox10.Value = Cells(no_colonne, 31).Value
TextBox20.Value = Cells(no_colonne, 44).Value
TextBox18.Value = Cells(no_colonne, 45).Value
End With
End Sub
'Modifier le code de produit
Private Sub Commandbutton2_click()
Dim no_colonne As Integer
Sheets("Saisie").Select
no_colonne = ComboBox18.ListIndex + 2
If ComboBox18.Value = "" Then
MsgBox ("Veuillez sélectionner le code de produit à modifier.")
Else
Cells(no_colonne, 13) = TextBox13.Value
Cells(no_colonne, 22) = ComboBox17.Value
Cells(no_colonne, 33) = TextBox5.Value
Cells(no_colonne, 31) = ComboBox10.Value
Cells(no_colonne, 44) = TextBox20.Value
Cells(no_colonne, 45) = TextBox18.Value
End If
End Sub
Merci énormément de votre aide.