Anweisung Global

Dimensioniert eine Variable oder ein Array auf globaler Ebene (also nicht innerhalb eine Subroutine oder Funktion), sodass die Variable oder das Array in allen Bibliotheken und Modulen für die Dauer der aktuellen Sitzung gültig ist.

Syntax:


Global VarName[(Anfang To Ende)] [As VarTyp][, VarName2[(Anfang To Ende)] [As VarTyp][,...]]

Beispiel:


Global iGlobalVar As Integer
Sub ExampleGlobal
    iGlobalVar = iGlobalVar + 1
    MsgBox iGlobalVar
End Sub

Bitte unterstützen Sie uns!