Domino 9 und frühere Versionen > Entwicklung
Edit Modus verbieten?
trouble:
Es funzt! Genau so, wie ich's haben wollte.
DANKE!!!!!!! :-*
trouble:
Upps, war wohl etwas vorschnell. Wenn ich jetzt ein neues Dokument erstellen will, bekomm ich die Meldung "Object Variable not set"
Was hab ich denn jetzt wieder falsch gemacht?
koehlerbv:
Keine Ahnung ;)
Schick mal den Code und nenne die zeile, die der Debugger bemängelt.
Kann nur 'ne Kleinigkeit sein.
Bernhard
trouble:
Hier der Code im Queryopen:
Sub Queryopen(Source As Notesuidocument, Mode As Integer, Isnewdoc As Variant, Continue As Variant)
If Source.EditMode = True And Source.Document.~$Ref (0) <> "" Then
Messagebox "This is an old version and must not be edited"
Continue = False
Exit Sub
End If
End Sub
Debugger meckert gleich am Anfang:
If Source.EditMode = True And Source.Document.~$Ref (0) <> "" Then
Glombi:
Kleiner Verbersserungsvorschlag:
Sub Queryopen(Source As Notesuidocument, Mode As Integer, Isnewdoc As Variant, Continue As Variant)
if Not Source.IsNewDoc then
If Source.EditMode = True And Source.Document.~$Ref (0) <> "" Then
Messagebox "This is an old version and must not be edited"
Continue = False
Exit Sub
End If
end if
End Sub
Kann sein, dass der das .Document im QueryOpen bei neuen Dokumenten nicht hat.
Andreas
Navigation
[0] Themen-Index
[#] Nächste Seite
[*] Vorherige Sete
Zur normalen Ansicht wechseln