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.

Variablen in VB (Excel-Makro)

Empfohlene Antworten

Veröffentlicht

Moin!

Hab null Ahnung von VB und brauche ein Makro, in dem man z.B. von Tabelle 1 bis 10 eine Zeile einfügt. Es hapert schon in der Deklaration der Variablen (es muß ja eine hochgezählt werden und bei "Sheets(???).Select" eingesetzt werden. Momentan sieht das Makro so aus:

Sub Makro1()

'

' Makro1 Makro

' Makro am 6.9.2001 von Pete007 aufgezeichnet

'

'

Rows("1:1").Select

Application.CutCopyMode = False

Selection.Copy

Sheets(???).Select

Rows("1:1").Select

Selection.Insert Shift:=xlDown

End Sub

VIELEN Dank!

Hey,

hier ist die Lösung für dein Problem


Public Sub Zeilen_einfuegen()


For x = 1 To 3          'Tabelle1 bis Tabelle3 für Tabelle 10 To 10 einfügen

    Sheets(x).Select    'Tabelle Anwählen

    Rows("1:1").Select  'Erste Spalte makieren

    Selection.Insert Shift:=xlDown  'Zellen einfügen

Next x

End Sub 

Anders als in C oder so muss man in VB in einer Zählschleife die Variablen nicht definieren.

Falls du doch mal ne Variable definieren wisst das geht so:

Dim Name_der_Variable As Integer

definiert eine Integervariable

So then have fun while coding!

CapitanX :D

Wow, dankeschön!

Das probier i doch glei mal aus :)

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.