Private Sub cboNummer_Change()
Dim myTbl As Excel.ListObject
Dim cntRow As Long, cntCol As Long
Dim rngTbl As Range, rngCol As Range
Dim rng1 As Range, rng2 As Range, rng3 As Range, rng4 As Range, rng5 As Range, rng6 As Range
Dim i As Integer
'set parameters
Set myTbl = ActiveSheet.ListObjects("TB_Invoer") 'tabel
With myTbl
cntRow = .ListRows.Count
' cntCol = .ListColumns.Count
' Set rngTbl = .DataBodyRange 'volledige tabel
Set rngCol = Range(myTbl & "[Nummer]")
Set rng1 = Range(myTbl & "[Naam Keyuser]")
Set rng2 = Range(myTbl & "[Datum van invoer]")
Set rng3 = Range(myTbl & "[Beschrijving]")
Set rng4 = Range(myTbl & "[Toelichting / Link]")
Set rng5 = Range(myTbl & "[Nav tabel / Scherm]")
Set rng6 = Range(myTbl & "[Soort]")
End With
'find ColRow
For i = 1 To cntRow
If rngCol.Cells(i, 1) = Me.cboNummer.Value Then
Me.cboKeyuser.Value = rng1.Cells(i, 1)
Me.DTPicker1.Value = rng2.Cells(i, 1)
Me.txtBeschrijving.Value = rng3.Cells(i, 1)
Me.txtToelichting.Value = rng4.Cells(i, 1)
Me.txtNAVtabel.Value = rng5.Cells(i, 1)
Me.cboSoort.Value = rng6.Cells(i, 1)
On Error Resume Next
Exit For
End If
Next i
End Sub