... hier ist sowas:
Sub Querymodechange(Source As Notesuidocument, Continue As Variant)
Dim ws As New NotesUiWorkspace
Dim doc As NotesDocument
Dim uidoc As NotesUiDocument
Dim session As New NotesSession
Dim db As NotesDatabase
Dim evalRG, evalR, evalG, evalW As Variant
Dim RolleRG, RolleR, RolleG, RolleW As String
Dim varReturnRG, varReturnR, varReturnG, varReturnW As Variant
Set uidoc = ws.currentDocument
Set doc = uidoc.document
Set db = session.currentDatabase
Continue = False
RolleG = "[Genehmiger]"
RolleR = "[Redakteur]"
RolleRG = "[RedakundGenehm]"
RolleW = "[WEB-Master]"
evalG = Evaluate("@UserNamesList")
evalR = Evaluate("@UserNamesList")
evalRG = Evaluate("@UserNamesList")
evalW = Evaluate("@UserNamesList")
varReturnG = Arraygetindex(evalG, RolleG)
varReturnR = Arraygetindex(evalR, RolleR)
varReturnRG = Arraygetindex(evalRG, RolleRG)
varReturnW = Arraygetindex(evalW, RolleW)
If uidoc.EditMode Then
Continue = True
Exit Sub
End If
If Isnull(varReturnR) And Isnull(varReturnG) And Isnull(varReturnRG) And Isnull(varReturnW) Then
Msgbox "Sie haben keine Berechtigung zum Bearbeiten !" , 16, "ACHTUNG"
Exit Sub
End If
Continue = True
End Sub