Hallo zusammen, ich habe folgendes Problem:
mein Makro kopiert im Moment einen Tabellenbereich in einen anderen. Er muss aber je nach Woche in einen anderen Bereich kopieren. Wie löse ich das Problem?
Also Tabelle 1 holt er die Daten, und soll nun in Tabelle 2 gucken, ob in Spalte A5 der selbe Wert steht wie in Tabelle 1 A5, wenn ja soll er die ganzen Werte kopieren, wenn nicht weitergucken nach Tabelle 2 A6 ob das mit Tabelle 1 A5 übereinstimmt usw. bis A25.
Ich hoffe ich habe mich einfach ausgedrückt 
Über jede Hilfe freue ich mich
sub Woche1
rem ----------------------------------------------------------------------
rem define variables
dim document as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService(„com.sun.star.frame.DispatchHelper“)
rem ----------------------------------------------------------------------
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = „Nr“
args1(0).Value = 1
dispatcher.executeDispatch(document, „.uno:JumpToTable“, „“, 0, args1())
rem ----------------------------------------------------------------------
dim args2(0) as new com.sun.star.beans.PropertyValue
args2(0).Name = „ToPoint“
args2(0).Value = „$B$5:blush:L$22“
dispatcher.executeDispatch(document, „.uno:GoToCell“, „“, 0, args2())
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, „.uno:Copy“, „“, 0, Array())
rem ----------------------------------------------------------------------
dim args4(0) as new com.sun.star.beans.PropertyValue
args4(0).Name = „Nr“
args4(0).Value = 3
dispatcher.executeDispatch(document, „.uno:JumpToTable“, „“, 0, args4())
rem ----------------------------------------------------------------------
dim args5(0) as new com.sun.star.beans.PropertyValue
args5(0).Name = „ToPoint“
args5(0).Value = „$B$5:blush:L$22“
dispatcher.executeDispatch(document, „.uno:GoToCell“, „“, 0, args5())
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, „.uno:stuck_out_tongue:aste“, „“, 0, Array())
rem ----------------------------------------------------------------------
dim args7(0) as new com.sun.star.beans.PropertyValue
args7(0).Name = „Nr“
args7(0).Value = 1
dispatcher.executeDispatch(document, „.uno:JumpToTable“, „“, 0, args7())
rem ----------------------------------------------------------------------
dim args8(0) as new com.sun.star.beans.PropertyValue
args8(0).Name = „ToPoint“
args8(0).Value = „$B$23:blush:L$23“
dispatcher.executeDispatch(document, „.uno:GoToCell“, „“, 0, args8())
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, „.uno:Copy“, „“, 0, Array())
rem ----------------------------------------------------------------------
dim args10(0) as new com.sun.star.beans.PropertyValue
args10(0).Name = „Nr“
args10(0).Value = 2
dispatcher.executeDispatch(document, „.uno:JumpToTable“, „“, 0, args10())
rem ----------------------------------------------------------------------
dim args11(0) as new com.sun.star.beans.PropertyValue
args11(0).Name = „ToPoint“
args11(0).Value = „$B$22:blush:L$22“
dispatcher.executeDispatch(document, „.uno:GoToCell“, „“, 0, args11())
rem ----------------------------------------------------------------------
dim args12(5) as new com.sun.star.beans.PropertyValue
args12(0).Name = „Flags“
args12(0).Value = „SVDNT“
args12(1).Name = „FormulaCommand“
args12(1).Value = 0
args12(2).Name = „SkipEmptyCells“
args12(2).Value = false
args12(3).Name = „Transpose“
args12(3).Value = false
args12(4).Name = „AsLink“
args12(4).Value = false
args12(5).Name = „MoveMode“
args12(5).Value = 4
dispatcher.executeDispatch(document, „.uno:InsertContents“, „“, 0, args12())
end sub