littlepete
Well-known Member
- Joined
- Mar 26, 2015
- Messages
- 507
- Office Version
- 365
- Platform
- Windows
hello all
i'm putting a NEXT and PREVIOUS button on my userform to see other data (from other rows) ...
strangely they work only once, and i think why: the activecell.row is stored in a variable, but in the datalist the active cell
remains on the same row.
how can i change my code to make it work?
i'm putting a NEXT and PREVIOUS button on my userform to see other data (from other rows) ...
strangely they work only once, and i think why: the activecell.row is stored in a variable, but in the datalist the active cell
remains on the same row.
how can i change my code to make it work?
VBA Code:
Sub pfvolgendepersoon_Click() ' sub next person
Dim dezerij As Long ' dezerij = this row
dezerij = ActiveCell.Row + 1
Sheets("gegevens").Range("b" & ActiveCell.Row).Select
ufpersonenfiche.pfnaam.Text = Sheets("gegevens").Range("ak" & dezerij).Value ' copying data from list to u.f.
... ( and so 30 more)