littlepete
Well-known Member
- Joined
- Mar 26, 2015
- Messages
- 507
- Office Version
- 365
- Platform
- Windows
hello 
my userform has two buttons PREVIOUS and NEXT to show data from the row before, or the row after the active cell row
but: on clicking in my data list to open the userform, it does not show anything, so now i click NEXT and then PREVIOUS and
then i get the data from the active cell row.
this is what i have:
and:
what should i change, to see the data from the active cell row immediately when i open the userform?
thank you for your time !!!

my userform has two buttons PREVIOUS and NEXT to show data from the row before, or the row after the active cell row

but: on clicking in my data list to open the userform, it does not show anything, so now i click NEXT and then PREVIOUS and
then i get the data from the active cell row.
this is what i have:
VBA Code:
Private Sub CommandButton13_Click()
Unload Me
ufpersonenfiche.Show ' to show the form with persons' data
End Sub
and:
VBA Code:
Sub pfvolgendepersoon_Click() ' show next row
Dim dezerij As Long
dezerij = ActiveCell.Row + 1
volgenderij:
If Range("bl" & dezerij).Value = "x" Or Range("bl" & dezerij).Value = "o" Then ' if column BL is x/o then skip row
dezerij = dezerij + 1
GoTo volgenderij
End If
Sheets("gegevens").Range("b" & dezerij).Select
ufpersonenfiche.pfnaam.Text = Sheets("gegevens").Range("ak" & dezerij).Value
ufpersonenfiche.pfgeboorte.Text = Sheets("gegevens").Range("q" & dezerij).Value
( ... => 39 lines to get all the data )
what should i change, to see the data from the active cell row immediately when i open the userform?
thank you for your time !!!