hilft nach dem ersten Durchlauf
Code: Alles auswählen
redim args1()
Jürgen
Moderator: Moderatoren
Code: Alles auswählen
redim args1(0)
Code: Alles auswählen
args1(0).Name = "ToPoint"
args1(0).Value = A(ind)
Code: Alles auswählen
Sub
ind=0
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
A = Array("$I$43:$K$73","$I$74:$K$101","$I102:$K$132","$I$133:$K$162","$I$163:$K$193")
B = Array("$N$46:$P$46","$Q$46:$S$46","$T$46:$V$46","$W$46:$Y$46","$Z$46:$AB$46")
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "ToPoint"
dim args3(0) as new com.sun.star.beans.PropertyValue
args3(0).Name = "ToPoint"
dim args4(5) as new com.sun.star.beans.PropertyValue
'(....)
while ind < 4
args1(0).Value = A(ind)
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args1())
dispatcher.executeDispatch(document, ".uno:Copy", "", 0, Array())
args3(0).Value = B(ind)
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args3())
'(...)
dispatcher.executeDispatch(document, ".uno:InsertContents", "", 0, args5())
ind=ind + 1
wend
end sub