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.

[VB] Split-Funktion

Empfohlene Antworten

Veröffentlicht

Hi,

da ich von VB nich gerade viel ahnung habe hänge ich bei Arrays fest.

Ich habe ein Textfeld in dem ich "y = [abc]" eingeben kann.

[abc] steht dabei für den wert den ich brauche.

Logischerweise würde man sowas mit labels machen, dürfen wir aber nicht.

nun verwende ich die splitfunktion um den string in zwei zu teilen, die beiden müssten nun in ein array und von dem wird das zweite element ausgegeben. nur irgendwie geht das mit dem array nicht O_o


Private Sub txt_ohm1_Change()

Dim value As String

value = Split(txt_ohm1, " = ")

sb_ohm1.value = value(1)

End Sub

Fehlermeldung:

Erwartet: Array


sb_ohm1.value = [b]value[/b](1)

Private Sub Form_Load()

Dim value As Variant

value = Array(1, 2)

value = Split("y = [abc]", " = ")

das = value(0)

End Sub

value(1) ist dann wert 2...

ganz korrekt scheints mir nicht zu sein, aber ich da schon lang nix mehr gemacht und seinen dienst tuts ja ;)

jo funktioniert super, danke!

Du kannst deine Variable auch gleich als Array deklarieren.

Dim value() as String 

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.