no save
Assistance
Achat
News

Forum | programmation
Codes VBA excel des boutons precédent et suiv
eriiic, le mer. 31 oct. 2007 à 13:05:11
Voici un exemple de ce que tu peux faire:
Dim ligneEnCours As Long
Private Sub Cmd_Préd_Click()
' je désir avoir les codes qui me permettrons de passer d'un enrégistrement à un autre
If ligneEnCours > 2 Then
ligneEnCours = ligneEnCours - 1
Else
ligneEnCours = 2
End If
TextBox1.Text = Cells(ligneEnCours , 1)
TextBox2.Text = Cells(ligneEnCours , 2)
End Sub

Private Sub Cmd_Suiv_Click()
' je désir avoir les codes qui me permettrons de passer d'un enrégistrement à un autre
If Cells(ligneEnCours + 1, 1) <> "" Then
ligneEnCours = ligneEnCours + 1
End If
TextBox1.Text = Cells(ligneEnCours , 1)
TextBox2.Text = Cells(ligneEnCours , 2)
End Sub

eric
PrécédentPolux31
oct. 07
baguidi
oct. 07
Suivant
REPONSES
eriiic
oct. 07
baguidi
oct. 07
eriiic
oct. 07
baguidi
oct. 07
baguidi
oct. 07
Polux31
oct. 07
baguidi
oct. 07
Polux31
oct. 07
eriiic
oct. 07
baguidi
oct. 07
Version Web
Réalisé par RedShift
no save