1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
| Public r As Integer
Private Sub UserForm_Initialize()
Sheets("produits").Activate
r = 2
Call MAJ(r)
End Sub
Private Sub CommandButton3_Click() 'suivant
r = r + 1
Call MAJ(r)
End Sub
Private Sub CommandButton2_Click() 'precedent
r = r - 1
Call MAJ(r)
End Sub
Sub MAJ(r As Integer) 'mise a jour des données
Me.ComboBox1 = Sheets("produits").Cells(r, 1) 'ID
Me.TextBox1 = Sheets("produits").Cells(r, 2) 'produits actif
Me.TextBox2 = Sheets("produits").Cells(r, 3) 'Produit
Me.TextBox3 = Sheets("produits").Cells(r, 4) 'Categorie
Me.TextBox4 = Sheets("produits").Cells(r, 22) 'breve...
Me.TextBox5 = Sheets("produits").Cells(r, 23) 'description
Me.TextBox6 = Sheets("produits").Cells(r, 24) 'etiquette
Me.TextBox7 = Sheets("produits").Cells(r, 28) 'URL
Me.TextBox8 = Sheets("produits").Cells(r, 31) 'url Images
Me.TextBox9 = Sheets("produits").Cells(r, 5) 'Prix d'achat
End Sub
Private Sub CommandButton4_Click() 'quitter
Unload Me
End Sub |
Partager