wie prüft man Zahlen, ob alle Ziffern identisch sind(außer 0)? 111,55555...WAHR. Danke im Voraus.
Gruß, Erhard
Sub aaa()
MsgBox ZahlPruefen(1111)
MsgBox ZahlPruefen(12111)
End Sub
Function ZahlPruefen(Zahl As Long) As Boolean
Dim i As Integer
Dim o As Object
Set o = CreateObject("scripting.dictionary")
For i = 1 To Len(Zahl)
o(Mid(Zahl, i, 1)) = 0
Next
ZahlPruefen = o.Count = 1
End Function
Gruß