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.

Empfohlene Antworten

Veröffentlicht

Hallo,

wie bekomme ich es hin, dass ich in einem Textfeld als Eingabe nur Zahlen und Buchstaben zulasse?

Oder besser gesagt: Der String MUSS Zahlen und Buchstaben enthalten!

Danke im Vorraus!

also funktion wüss ich jetzt da keine (für numerisch gibts ja IsNumeric() )

nochmal das ich dich richtig versthen es dürfen Zahlen und alphanumerische Zeichen drin sein aber keine Sonderzeichen, oder ?

mfg byte

Hallo,

richtig, es dürfen nur Ziffern und Buchstaben enthalten sein!

Die Funktion IsNumeric() ist mir bekannt, nur leider reicht mir die alleine nicht!

Habe im Moment aber auch keine richtige Idee!?!?

@palvoelgyi: Als Eingabeformat habe ich bereits 'Kennwort' eingestellt!

mfg

Tja, darauf wird es wohl hinaus laufen..

Dachte nur, dass schon jemand so ein Problem hatte und mir helfen kann!

Via API und "User32" kann man die Funktion IsCharAlphaNumeric dafür benutzen. Allerdings jeden Buchstaben einzeln.

Private Declare Function IsCharAlphaNumeric Lib "user32" Alias "IsCharAlphaNumericA" (ByVal cChar As Byte) As Long

Private Sub Command1_Click()

Dim car As String

Dim ascii As Integer

car = "+" // oder "W"

ascii = Asc(car)

If IsCharAlphaNumeric(ascii) Then MsgBox " AlphaNumeric"

End Sub

Nachtrag : Du meintest erst müssen Zahlen/Buchstaben enthalten später dürfen nur .

Die Funktion kann natürlich nicht prüfen ob Zahlen und Buchstaben drin sind.

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

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.