- #1
S
SchmidtMarco
Guest
Hallo zusammen,
habe mal wieder ein kleines Makro-Problem...Wenn ich folgendes Makro ablaufen lassen möchte erhalte ich die Fehlermeldung Index außerhalb des gültigen Bereichs. Warum?
Quelltext des Makros:
Dim intcTab1 ->Zählvariable für erstes Tabellenblatt
Dim intcTab2 ->Zählvariable für zweites Tabellenblatt
Dim intcTab3 ->Zählvariable für drittes Tabellenblatt
Dim intL1 ->Zählvariable 1 für das Entfernen doppelter Nummern
Dim intL2 ->Zählvariable 2 für das Entfernen doppelter Nummern
intcTab1 = 1 ->Setzen der Variable
intcTab2 = 1 ->Setzen der Variable
intcTab3 = 1 ->Setzen der Variable
intL1 = 1 ->Setzen der Variable
intL2 = 1 ->Setzen der Variable
'________________________________________________________________________________________________
'DATENSÄTZE AUS TABELLE 1 UND TABELLE 2 IN TABELLE 3 KOPIEREN
Sheets(Tabelle1).Select
While Cells(intcTab1, 1) <>
intcTab1 = intcTab1 + 1
Wend
Rows(1: & intcTab1).Select
Selection.Copy
Sheets(Tabelle3).Select
Range(A1).Select
ActiveSheet.Paste
Application.CutCopyMode = False
Sheets(Tabelle2).Select
While Cells(intcTab2, 1) <>
intcTab2 = intcTab2 + 1
Wend
Rows(1: & intcTab2).Select
Selection.Copy
Sheets(Tabelle3).Select
Range(A & intcTab1).Select
ActiveSheet.Paste
Application.CutCopyMode = False
Gruß, Marco
habe mal wieder ein kleines Makro-Problem...Wenn ich folgendes Makro ablaufen lassen möchte erhalte ich die Fehlermeldung Index außerhalb des gültigen Bereichs. Warum?
Quelltext des Makros:
Dim intcTab1 ->Zählvariable für erstes Tabellenblatt
Dim intcTab2 ->Zählvariable für zweites Tabellenblatt
Dim intcTab3 ->Zählvariable für drittes Tabellenblatt
Dim intL1 ->Zählvariable 1 für das Entfernen doppelter Nummern
Dim intL2 ->Zählvariable 2 für das Entfernen doppelter Nummern
intcTab1 = 1 ->Setzen der Variable
intcTab2 = 1 ->Setzen der Variable
intcTab3 = 1 ->Setzen der Variable
intL1 = 1 ->Setzen der Variable
intL2 = 1 ->Setzen der Variable
'________________________________________________________________________________________________
'DATENSÄTZE AUS TABELLE 1 UND TABELLE 2 IN TABELLE 3 KOPIEREN
Sheets(Tabelle1).Select
While Cells(intcTab1, 1) <>
intcTab1 = intcTab1 + 1
Wend
Rows(1: & intcTab1).Select
Selection.Copy
Sheets(Tabelle3).Select
Range(A1).Select
ActiveSheet.Paste
Application.CutCopyMode = False
Sheets(Tabelle2).Select
While Cells(intcTab2, 1) <>
intcTab2 = intcTab2 + 1
Wend
Rows(1: & intcTab2).Select
Selection.Copy
Sheets(Tabelle3).Select
Range(A & intcTab1).Select
ActiveSheet.Paste
Application.CutCopyMode = False
Gruß, Marco