Makro für alle Tabellenblätter
Verfasst: Fr, 08.10.2010 09:25
Hallo!
Ich habe ein Makro das auf allen Tabellenblättern ausgeführt werden soll. Im Moment macht es das nur auf dem 1. Blatt. Was muss ich denn ändern damit das funktioniert?
Moderation,4: Zweitposting im CALC-Bereich gelöscht; CODE-Tags gesetzt
Ich habe ein Makro das auf allen Tabellenblättern ausgeführt werden soll. Im Moment macht es das nur auf dem 1. Blatt. Was muss ich denn ändern damit das funktioniert?
Code: Alles auswählen
REM ***** BASIC *****
Sub Main
End Sub
sub Tom
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 = "ToPoint"
args1(0).Value = "$CZ$27:$EL$31"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args1())
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:Copy", "", 0, Array())
rem ----------------------------------------------------------------------
dim args3(0) as new com.sun.star.beans.PropertyValue
args3(0).Name = "ToPoint"
args3(0).Value = "$CZ$33"
Moderation,4: Zweitposting im CALC-Bereich gelöscht; CODE-Tags gesetzt