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.

Variablenanzahl dynamisch deklarieren

Empfohlene Antworten

Hallo,

kann ich in VB, bzw. in einem Word-Makro Variablen deklarieren, obwohl ich vorher nicht weiß, wieviele ich brauche?

Ich dachte dabei an eine for -Schleife:

for i = 1 to anzahl_datensätze

variable+cstr(i) = variableninhalt

next i

Bei 20 Datensätzen brauche ich also 20 variablen von variable1 bis variable20.

Wenn das möglich ist, hätte ich gerne die richtige Syntax. Ich habe in der Hilfe nichts dazu gefunden.

Danke im Voraus!

Siga

Warum machst du kein Array?

Dim Array() AS String 'Bei leerer Klammer dynamisch

Array(0) = "Bla"

Array(1) = "asdfas"

.

.

.

Array(n) = "fsgsf"

Dann gehst du mit ner Schleife das Array durch (von 0 bis n) und lieferst den Rückgabewert an eine Zelle...

Range("Zelle z.B. A1 ").Select = Array(n)

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.