"Is Nothing" verneinen

  • Hallo,


    schon lange nix mehr codiert daher die Frage:


    Wenn ich eine Abfrage habe

    Code
    If notesdoc Is Nothing Then
    Else
      <tue irgendwas>
    End If


    habe ich einen leeren if-Zweig und das ist ja nicht so schön.


    Gibt es daher auch die Möglichkeit, eine Abfrage à la "Is Not Nothing" zu basteln?!


    Wahrscheinlich ne einfache Antwort, komm halt nur grad nicht drauf :wuet:


    THX

    Achtung Anfänger - bitte für dumme Fragen nicht schlagen :hammer:
    :D

  • Schon nahe dran.
    If Not (notesdoc Is Nothing) Then
    ...
    End If

    Life is not a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside, thoroughly used up, totally worn out, and loudly proclaiming "Wow, what a ride!!! :evil:
    Beschleunigung ist, wenn die Tränen der Ergriffenheit waagrecht zum Ohr hin abfliessen - Walter Röhrl