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.

Array in Array kopieren

Empfohlene Antworten

Veröffentlicht

For count = 0 To 100

        'MsgBox "Start " & count

        Text = "00000" & count & ";User " & count

        itpers = Split(Text, ";")

        frmMask.txtPersNr.AddItem itpers(0)

        frmMask.txtPersName.AddItem itpers(1)

        'dbpers(count) = itpers(0) & itpers(1)

        'MsgBox "Ende " & count

Next
dbpers ist mein Hauparray wo itpers gespeichert werden soll. Bloß wie füge ich itpers in dbpers ein? Er gibt mir immer Error: Index außerhalb des gültigen Bereiches. Deklariert sind beide arrays im script header
Dim dbpers() As String

Dim itpers() As String

Guten Abend,

Du musst in VB die Arrays mit "Redim" dimensionieren!


Dim dbPers() As String

' VORSICHT: Array wird dimensioniert, aber vorhandene Werte

'                 Werte werden gelöscht

Redim dbPers(0)

' Redim Preserve bewirkt, dass die Arraywerte erhalten bleiben,

' also das richtige für Dich

Redim Preserve dbPers(2)


In VB gibt es außerdem noch die Funktionen LBound(Array()) und UBound(Array()), LBound ist der kleinste Index und UBound der Größte, perfekt für Schleifen. Ich würde das so machen (ungetestet):

Dim dbpers() As String

Dim itpers() As String

Dim i          As Long

' Array dimensionieren

Redim dbPers(0)

For count = 0 To 100

     Text = "00000" & count & "; User " & count

      itpers = Split(Text, ";")

      frmMask.txtPersNr.AddItem itpers(0)

      frmMask.txtPersName.AddItem itpers(1)

      ' höchsten Index + 1

      i = UBound(dbPers())+1

      Redim Preserve dbPers(i)

      dbPers(i) = itPers(0) & itPers(1)

Next count

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.