Private Sub ribbonui_getvisible(ByRef control As IRibbonControl, ByRef ReturnValue As Variant)
Select Case control.ID
Case "TabINKOOP": ReturnValue = CheckGebruiker(1)
Case "TabVERKOOP": ReturnValue = CheckGebruiker(2)
Case "TabONDERHOUD": ReturnValue = CheckGebruiker(3)
End Select
End Sub
Function CheckGebruiker(Sectie As Integer) As Boolean
With Sheets("Gebruikers")
For i = 2 To .Cells(2, Sectie).CurrentRegion.Rows.Count
If Environ("username") = .Cells(i, Sectie) Then
CheckGebruiker = True
Exit For
End If
Next i
End With
End Function