Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

VBA in Excel

Empfohlene Antworten

Hi Leute

Ich will quasi eine Abfrage machen die eine Zahl abfrägt die 10 Stellen haben soll. Nur leider geht er immer in das Then egal was ich mache. Wo liegt mein Fehler?

If TextBox0 < "[##########]" Then

MsgBox "Die Nummer muss 10 Stellen betragen"

TextBox0.SetFocus

Else.....

Hi,

wie Wäre es mit einem Trick.

Frag doch einfach auf Textbox<1000000000 ab. alles was kleiner ist hat nur neun Stellen, oder werden hier führende Nullen mitgegeben?

Gruß,

Tiana

Und mit den Platzhaltern geht das nicht?

Das muß doch auch machbar sein

Hi,

mhhh vielleicht mit If Format(textbox,##########)=false Then

...

muss Du mal ausprobieren!

GRuß, Tiana

Funktioniert auch nicht!

Hi,

hast Du denn führende Nullen dabei (z.B. 001476225614)?

Gruß, Tiana

Im Moment nicht das kann aber vorkommen.

Hi,

also in dem Fall (dein Wert ist mit der Option auf führende Nullen ja ein alphanumerischer wert) mach doch einfach folgendes (einfach ist am Besten):

if len(textfeld.text)<10 then

msgbox "Eyyyyy!"

GRuß, Tiana

Ich glaube nicht, dass man mit Platzhaltern arbeiten kann. Lass mich aber gerne vom Gegenteil überzeugen.

Juhhuuuuuuuu es funktioniert.

Deine Löung war gut :):P

If Len(TextBox0.Text) < 10 Then

Gruß UTGMK:marine :bimei :OD :e@sy

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.