wie kann ich überprüfen ob meine Zahl, eine Variable long Namens auftrag 5-stellig ist?
if target.NumberFormat = "#####" & auftrag then
MsgBox auftrag
end if
danke im Voraus
Markus
if target.NumberFormat = "#####" & auftrag then
MsgBox auftrag
end if
Option Explicit
Sub tt()
Dim x
x = 12345
MsgBox Len(x)
End Sub
Bei Dir nicht?Function auftragseingabe()
Dim auftr
auftr = 12345
auftrag = InputBox("Bitte 5-stellige Auftragsnummer eingeben:", "Auftragssuche", auftr)
If Len(auftrag) = 5 Then MsgBox "richtig"
end Function
aber so funktioniert es:
Function auftragseingabe()
Dim auftr
auftr = 12345
auftrag = InputBox("Bitte 5-stellige Auftragsnummer eingeben:", "Auftragssuche", auftr)
If Len(auftr) = 5 Then MsgBox "richtig"
end Function