Option Explicit
Sub Array_vergleichen()
Dim Inhalt(0 To 4)
Dim n%, x%
Dim Gleich As Boolean
' Für Testzwecke
Inhalt(0) = 0
Inhalt(1) = 1
Inhalt(2) = 1
Inhalt(3) = 3
Inhalt(4) = 1
For n = LBound(Inhalt()) To UBound(Inhalt())
Gleich = False
' Schleife verlassen, wenn größer als erlaubter Index +1
If (n + 1) > UBound(Inhalt()) Then Exit For
For x = (n + 1) To UBound(Inhalt())
If Inhalt(n) = Inhalt(x) Then
Gleich = True
GoSub SPRUNGMARKE
End If
Next x
Next n
Bei weiteren Fragen einfach melden.
mfg, GraFri