Flackern nach Ausführen eines Makro
Verfasst: Do, 03.12.2009 11:47
Hallo !
Nachdem ich ein Makro zum Sperren von Teilen einer Tabelle ausgeführt habe, flackert plötzlich die Seite in der Seitenansicht. Erst wenn ich eine hohe Auflösung (160 % und höher) wähle, hört das Flackern auf. Vielleicht liegt es ja am Makro, da es ohne dieses Makro nicht passiert.
Kann mir jemand helfen?
Danke schon mal
Gruß Andreas
Hier mal das Makro:
Sub Main
End Sub
sub sperren
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 = "Protect"
args1(0).Value = false
dispatcher.executeDispatch(document, ".uno:Protect", "ah01", 0, args1())
rem ----------------------------------------------------------------------
dim args2(0) as new com.sun.star.beans.PropertyValue
args2(0).Name = "ToPoint"
args2(0).Value = "$E$3"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args2())
rem ----------------------------------------------------------------------
dim args3(3) as new com.sun.star.beans.PropertyValue
args3(0).Name = "Protection.Locked"
args3(0).Value = true
args3(1).Name = "Protection.FormulasHidden"
args3(1).Value = false
args3(2).Name = "Protection.Hidden"
args3(2).Value = false
args3(3).Name = "Protection.HiddenInPrintout"
args3(3).Value = false
dispatcher.executeDispatch(document, ".uno:Protection", "", 0, args3())
rem ----------------------------------------------------------------------
dim args4(0) as new com.sun.star.beans.PropertyValue
args4(0).Name = "ToPoint"
args4(0).Value = "$Q$2"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args4())
rem ----------------------------------------------------------------------
dim args5(3) as new com.sun.star.beans.PropertyValue
args5(0).Name = "Protection.Locked"
args5(0).Value = true
args5(1).Name = "Protection.FormulasHidden"
args5(1).Value = false
args5(2).Name = "Protection.Hidden"
args5(2).Value = false
args5(3).Name = "Protection.HiddenInPrintout"
args5(3).Value = false
dispatcher.executeDispatch(document, ".uno:Protection", "", 0, args5())
rem ----------------------------------------------------------------------
dim args6(0) as new com.sun.star.beans.PropertyValue
args6(0).Name = "ToPoint"
args6(0).Value = "$D$5:$AH$5"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args6())
rem ----------------------------------------------------------------------
dim args7(3) as new com.sun.star.beans.PropertyValue
args7(0).Name = "Protection.Locked"
args7(0).Value = true
args7(1).Name = "Protection.FormulasHidden"
args7(1).Value = false
args7(2).Name = "Protection.Hidden"
args7(2).Value = false
args7(3).Name = "Protection.HiddenInPrintout"
args7(3).Value = false
dispatcher.executeDispatch(document, ".uno:Protection", "", 0, args7())
rem ----------------------------------------------------------------------
dim args8(0) as new com.sun.star.beans.PropertyValue
args8(0).Name = "ToPoint"
args8(0).Value = "$C$9:$AI$38"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args8())
rem ----------------------------------------------------------------------
dim args9(3) as new com.sun.star.beans.PropertyValue
args9(0).Name = "Protection.Locked"
args9(0).Value = true
args9(1).Name = "Protection.FormulasHidden"
args9(1).Value = false
args9(2).Name = "Protection.Hidden"
args9(2).Value = false
args9(3).Name = "Protection.HiddenInPrintout"
args9(3).Value = false
dispatcher.executeDispatch(document, ".uno:Protection", "", 0, args9())
rem ----------------------------------------------------------------------
dim args10(0) as new com.sun.star.beans.PropertyValue
args10(0).Name = "ToPoint"
args10(0).Value = "$B$42"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args10())
rem ----------------------------------------------------------------------
dim args11(3) as new com.sun.star.beans.PropertyValue
args11(0).Name = "Protection.Locked"
args11(0).Value = true
args11(1).Name = "Protection.FormulasHidden"
args11(1).Value = false
args11(2).Name = "Protection.Hidden"
args11(2).Value = false
args11(3).Name = "Protection.HiddenInPrintout"
args11(3).Value = false
dispatcher.executeDispatch(document, ".uno:Protection", "", 0, args11())
rem ----------------------------------------------------------------------
dim args12(0) as new com.sun.star.beans.PropertyValue
args12(0).Name = "ToPoint"
args12(0).Value = "$B$44"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args12())
rem ----------------------------------------------------------------------
dim args13(3) as new com.sun.star.beans.PropertyValue
args13(0).Name = "Protection.Locked"
args13(0).Value = true
args13(1).Name = "Protection.FormulasHidden"
args13(1).Value = false
args13(2).Name = "Protection.Hidden"
args13(2).Value = false
args13(3).Name = "Protection.HiddenInPrintout"
args13(3).Value = false
dispatcher.executeDispatch(document, ".uno:Protection", "", 0, args13())
rem ----------------------------------------------------------------------
dim args14(0) as new com.sun.star.beans.PropertyValue
args14(0).Name = "ToPoint"
args14(0).Value = "$E$41:$AD$49"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args14())
rem ----------------------------------------------------------------------
dim args15(3) as new com.sun.star.beans.PropertyValue
args15(0).Name = "Protection.Locked"
args15(0).Value = true
args15(1).Name = "Protection.FormulasHidden"
args15(1).Value = false
args15(2).Name = "Protection.Hidden"
args15(2).Value = false
args15(3).Name = "Protection.HiddenInPrintout"
args15(3).Value = false
dispatcher.executeDispatch(document, ".uno:Protection", "", 0, args15())
rem ----------------------------------------------------------------------
dim args16(0) as new com.sun.star.beans.PropertyValue
args16(0).Name = "ToPoint"
args16(0).Value = "$AI$42"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args16())
rem ----------------------------------------------------------------------
dim args17(3) as new com.sun.star.beans.PropertyValue
args17(0).Name = "Protection.Locked"
args17(0).Value = true
args17(1).Name = "Protection.FormulasHidden"
args17(1).Value = false
args17(2).Name = "Protection.Hidden"
args17(2).Value = false
args17(3).Name = "Protection.HiddenInPrintout"
args17(3).Value = false
dispatcher.executeDispatch(document, ".uno:Protection", "", 0, args17())
rem ----------------------------------------------------------------------
dim args18(0) as new com.sun.star.beans.PropertyValue
args18(0).Name = "ToPoint"
args18(0).Value = "$AI$46"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args18())
rem ----------------------------------------------------------------------
dim args19(3) as new com.sun.star.beans.PropertyValue
args19(0).Name = "Protection.Locked"
args19(0).Value = true
args19(1).Name = "Protection.FormulasHidden"
args19(1).Value = false
args19(2).Name = "Protection.Hidden"
args19(2).Value = false
args19(3).Name = "Protection.HiddenInPrintout"
args19(3).Value = false
dispatcher.executeDispatch(document, ".uno:Protection", "", 0, args19())
rem ----------------------------------------------------------------------
dim args20(0) as new com.sun.star.beans.PropertyValue
args20(0).Name = "ToPoint"
args20(0).Value = "$AK$15:$AT$22"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args20())
rem ----------------------------------------------------------------------
dim args21(0) as new com.sun.star.beans.PropertyValue
args21(0).Name = "ToPoint"
args21(0).Value = "$AN$26"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args21())
rem ----------------------------------------------------------------------
dim args22(0) as new com.sun.star.beans.PropertyValue
args22(0).Name = "ToPoint"
args22(0).Value = "$AT$10"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args22())
rem ----------------------------------------------------------------------
dim args23(3) as new com.sun.star.beans.PropertyValue
args23(0).Name = "Protection.Locked"
args23(0).Value = true
args23(1).Name = "Protection.FormulasHidden"
args23(1).Value = false
args23(2).Name = "Protection.Hidden"
args23(2).Value = false
args23(3).Name = "Protection.HiddenInPrintout"
args23(3).Value = false
dispatcher.executeDispatch(document, ".uno:Protection", "", 0, args23())
rem ----------------------------------------------------------------------
dim args24(0) as new com.sun.star.beans.PropertyValue
args24(0).Name = "ToPoint"
args24(0).Value = "$BD$10"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args24())
rem ----------------------------------------------------------------------
dim args25(3) as new com.sun.star.beans.PropertyValue
args25(0).Name = "Protection.Locked"
args25(0).Value = true
args25(1).Name = "Protection.FormulasHidden"
args25(1).Value = false
args25(2).Name = "Protection.Hidden"
args25(2).Value = false
args25(3).Name = "Protection.HiddenInPrintout"
args25(3).Value = false
dispatcher.executeDispatch(document, ".uno:Protection", "", 0, args25())
rem ----------------------------------------------------------------------
dim args26(0) as new com.sun.star.beans.PropertyValue
args26(0).Name = "ToPoint"
args26(0).Value = "$AK$15:$AT$22"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args26())
rem ----------------------------------------------------------------------
dim args27(3) as new com.sun.star.beans.PropertyValue
args27(0).Name = "Protection.Locked"
args27(0).Value = true
args27(1).Name = "Protection.FormulasHidden"
args27(1).Value = false
args27(2).Name = "Protection.Hidden"
args27(2).Value = false
args27(3).Name = "Protection.HiddenInPrintout"
args27(3).Value = false
dispatcher.executeDispatch(document, ".uno:Protection", "", 0, args27())
rem ----------------------------------------------------------------------
dim args28(0) as new com.sun.star.beans.PropertyValue
args28(0).Name = "ToPoint"
args28(0).Value = "$AU$15:$BD$18"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args28())
rem ----------------------------------------------------------------------
dim args29(3) as new com.sun.star.beans.PropertyValue
args29(0).Name = "Protection.Locked"
args29(0).Value = true
args29(1).Name = "Protection.FormulasHidden"
args29(1).Value = false
args29(2).Name = "Protection.Hidden"
args29(2).Value = false
args29(3).Name = "Protection.HiddenInPrintout"
args29(3).Value = false
dispatcher.executeDispatch(document, ".uno:Protection", "", 0, args29())
rem ----------------------------------------------------------------------
dim args30(0) as new com.sun.star.beans.PropertyValue
args30(0).Name = "ToPoint"
args30(0).Value = "$AW$19:$AX$22"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args30())
rem ----------------------------------------------------------------------
dim args31(3) as new com.sun.star.beans.PropertyValue
args31(0).Name = "Protection.Locked"
args31(0).Value = true
args31(1).Name = "Protection.FormulasHidden"
args31(1).Value = false
args31(2).Name = "Protection.Hidden"
args31(2).Value = false
args31(3).Name = "Protection.HiddenInPrintout"
args31(3).Value = false
dispatcher.executeDispatch(document, ".uno:Protection", "", 0, args31())
rem ----------------------------------------------------------------------
dim args32(0) as new com.sun.star.beans.PropertyValue
args32(0).Name = "ToPoint"
args32(0).Value = "$AY$22:$BD$22"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args32())
rem ----------------------------------------------------------------------
dim args33(3) as new com.sun.star.beans.PropertyValue
args33(0).Name = "Protection.Locked"
args33(0).Value = true
args33(1).Name = "Protection.FormulasHidden"
args33(1).Value = false
args33(2).Name = "Protection.Hidden"
args33(2).Value = false
args33(3).Name = "Protection.HiddenInPrintout"
args33(3).Value = false
dispatcher.executeDispatch(document, ".uno:Protection", "", 0, args33())
rem ----------------------------------------------------------------------
dim args34(0) as new com.sun.star.beans.PropertyValue
args34(0).Name = "ToPoint"
args34(0).Value = "$AU$23"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args34())
rem ----------------------------------------------------------------------
dim args35(3) as new com.sun.star.beans.PropertyValue
args35(0).Name = "Protection.Locked"
args35(0).Value = true
args35(1).Name = "Protection.FormulasHidden"
args35(1).Value = false
args35(2).Name = "Protection.Hidden"
args35(2).Value = false
args35(3).Name = "Protection.HiddenInPrintout"
args35(3).Value = false
dispatcher.executeDispatch(document, ".uno:Protection", "", 0, args35())
rem ----------------------------------------------------------------------
dim args36(0) as new com.sun.star.beans.PropertyValue
args36(0).Name = "ToPoint"
args36(0).Value = "$AY$23"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args36())
rem ----------------------------------------------------------------------
rem dispatcher.executeDispatch(document, ".uno:FormatCellDialog", "", 0, Array())
rem ----------------------------------------------------------------------
dim args38(0) as new com.sun.star.beans.PropertyValue
args38(0).Name = "ToPoint"
args38(0).Value = "$AT$27"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args38())
rem ----------------------------------------------------------------------
dim args39(3) as new com.sun.star.beans.PropertyValue
args39(0).Name = "Protection.Locked"
args39(0).Value = true
args39(1).Name = "Protection.FormulasHidden"
args39(1).Value = false
args39(2).Name = "Protection.Hidden"
args39(2).Value = false
args39(3).Name = "Protection.HiddenInPrintout"
args39(3).Value = false
dispatcher.executeDispatch(document, ".uno:Protection", "", 0, args39())
rem ----------------------------------------------------------------------
dim args40(0) as new com.sun.star.beans.PropertyValue
args40(0).Name = "ToPoint"
args40(0).Value = "$AK$32:$BD$39"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args40())
rem ----------------------------------------------------------------------
dim args41(3) as new com.sun.star.beans.PropertyValue
args41(0).Name = "Protection.Locked"
args41(0).Value = true
args41(1).Name = "Protection.FormulasHidden"
args41(1).Value = false
args41(2).Name = "Protection.Hidden"
args41(2).Value = false
args41(3).Name = "Protection.HiddenInPrintout"
args41(3).Value = false
dispatcher.executeDispatch(document, ".uno:Protection", "", 0, args41())
rem ----------------------------------------------------------------------
dim args42(0) as new com.sun.star.beans.PropertyValue
args42(0).Name = "ToPoint"
args42(0).Value = "$AK$41"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args42())
rem ----------------------------------------------------------------------
dim args43(3) as new com.sun.star.beans.PropertyValue
args43(0).Name = "Protection.Locked"
args43(0).Value = true
args43(1).Name = "Protection.FormulasHidden"
args43(1).Value = false
args43(2).Name = "Protection.Hidden"
args43(2).Value = false
args43(3).Name = "Protection.HiddenInPrintout"
args43(3).Value = false
dispatcher.executeDispatch(document, ".uno:Protection", "", 0, args43())
rem ----------------------------------------------------------------------
dim args44(0) as new com.sun.star.beans.PropertyValue
args44(0).Name = "ToPoint"
args44(0).Value = "$C$9"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args44())
rem ----------------------------------------------------------------------
dim args45(0) as new com.sun.star.beans.PropertyValue
args45(0).Name = "Protect"
args45(0).Value = true
dispatcher.executeDispatch(document, ".uno:Protect", "ah01", 0, args45())
end sub
Nachdem ich ein Makro zum Sperren von Teilen einer Tabelle ausgeführt habe, flackert plötzlich die Seite in der Seitenansicht. Erst wenn ich eine hohe Auflösung (160 % und höher) wähle, hört das Flackern auf. Vielleicht liegt es ja am Makro, da es ohne dieses Makro nicht passiert.
Kann mir jemand helfen?
Danke schon mal
Gruß Andreas
Hier mal das Makro:
Sub Main
End Sub
sub sperren
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 = "Protect"
args1(0).Value = false
dispatcher.executeDispatch(document, ".uno:Protect", "ah01", 0, args1())
rem ----------------------------------------------------------------------
dim args2(0) as new com.sun.star.beans.PropertyValue
args2(0).Name = "ToPoint"
args2(0).Value = "$E$3"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args2())
rem ----------------------------------------------------------------------
dim args3(3) as new com.sun.star.beans.PropertyValue
args3(0).Name = "Protection.Locked"
args3(0).Value = true
args3(1).Name = "Protection.FormulasHidden"
args3(1).Value = false
args3(2).Name = "Protection.Hidden"
args3(2).Value = false
args3(3).Name = "Protection.HiddenInPrintout"
args3(3).Value = false
dispatcher.executeDispatch(document, ".uno:Protection", "", 0, args3())
rem ----------------------------------------------------------------------
dim args4(0) as new com.sun.star.beans.PropertyValue
args4(0).Name = "ToPoint"
args4(0).Value = "$Q$2"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args4())
rem ----------------------------------------------------------------------
dim args5(3) as new com.sun.star.beans.PropertyValue
args5(0).Name = "Protection.Locked"
args5(0).Value = true
args5(1).Name = "Protection.FormulasHidden"
args5(1).Value = false
args5(2).Name = "Protection.Hidden"
args5(2).Value = false
args5(3).Name = "Protection.HiddenInPrintout"
args5(3).Value = false
dispatcher.executeDispatch(document, ".uno:Protection", "", 0, args5())
rem ----------------------------------------------------------------------
dim args6(0) as new com.sun.star.beans.PropertyValue
args6(0).Name = "ToPoint"
args6(0).Value = "$D$5:$AH$5"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args6())
rem ----------------------------------------------------------------------
dim args7(3) as new com.sun.star.beans.PropertyValue
args7(0).Name = "Protection.Locked"
args7(0).Value = true
args7(1).Name = "Protection.FormulasHidden"
args7(1).Value = false
args7(2).Name = "Protection.Hidden"
args7(2).Value = false
args7(3).Name = "Protection.HiddenInPrintout"
args7(3).Value = false
dispatcher.executeDispatch(document, ".uno:Protection", "", 0, args7())
rem ----------------------------------------------------------------------
dim args8(0) as new com.sun.star.beans.PropertyValue
args8(0).Name = "ToPoint"
args8(0).Value = "$C$9:$AI$38"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args8())
rem ----------------------------------------------------------------------
dim args9(3) as new com.sun.star.beans.PropertyValue
args9(0).Name = "Protection.Locked"
args9(0).Value = true
args9(1).Name = "Protection.FormulasHidden"
args9(1).Value = false
args9(2).Name = "Protection.Hidden"
args9(2).Value = false
args9(3).Name = "Protection.HiddenInPrintout"
args9(3).Value = false
dispatcher.executeDispatch(document, ".uno:Protection", "", 0, args9())
rem ----------------------------------------------------------------------
dim args10(0) as new com.sun.star.beans.PropertyValue
args10(0).Name = "ToPoint"
args10(0).Value = "$B$42"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args10())
rem ----------------------------------------------------------------------
dim args11(3) as new com.sun.star.beans.PropertyValue
args11(0).Name = "Protection.Locked"
args11(0).Value = true
args11(1).Name = "Protection.FormulasHidden"
args11(1).Value = false
args11(2).Name = "Protection.Hidden"
args11(2).Value = false
args11(3).Name = "Protection.HiddenInPrintout"
args11(3).Value = false
dispatcher.executeDispatch(document, ".uno:Protection", "", 0, args11())
rem ----------------------------------------------------------------------
dim args12(0) as new com.sun.star.beans.PropertyValue
args12(0).Name = "ToPoint"
args12(0).Value = "$B$44"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args12())
rem ----------------------------------------------------------------------
dim args13(3) as new com.sun.star.beans.PropertyValue
args13(0).Name = "Protection.Locked"
args13(0).Value = true
args13(1).Name = "Protection.FormulasHidden"
args13(1).Value = false
args13(2).Name = "Protection.Hidden"
args13(2).Value = false
args13(3).Name = "Protection.HiddenInPrintout"
args13(3).Value = false
dispatcher.executeDispatch(document, ".uno:Protection", "", 0, args13())
rem ----------------------------------------------------------------------
dim args14(0) as new com.sun.star.beans.PropertyValue
args14(0).Name = "ToPoint"
args14(0).Value = "$E$41:$AD$49"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args14())
rem ----------------------------------------------------------------------
dim args15(3) as new com.sun.star.beans.PropertyValue
args15(0).Name = "Protection.Locked"
args15(0).Value = true
args15(1).Name = "Protection.FormulasHidden"
args15(1).Value = false
args15(2).Name = "Protection.Hidden"
args15(2).Value = false
args15(3).Name = "Protection.HiddenInPrintout"
args15(3).Value = false
dispatcher.executeDispatch(document, ".uno:Protection", "", 0, args15())
rem ----------------------------------------------------------------------
dim args16(0) as new com.sun.star.beans.PropertyValue
args16(0).Name = "ToPoint"
args16(0).Value = "$AI$42"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args16())
rem ----------------------------------------------------------------------
dim args17(3) as new com.sun.star.beans.PropertyValue
args17(0).Name = "Protection.Locked"
args17(0).Value = true
args17(1).Name = "Protection.FormulasHidden"
args17(1).Value = false
args17(2).Name = "Protection.Hidden"
args17(2).Value = false
args17(3).Name = "Protection.HiddenInPrintout"
args17(3).Value = false
dispatcher.executeDispatch(document, ".uno:Protection", "", 0, args17())
rem ----------------------------------------------------------------------
dim args18(0) as new com.sun.star.beans.PropertyValue
args18(0).Name = "ToPoint"
args18(0).Value = "$AI$46"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args18())
rem ----------------------------------------------------------------------
dim args19(3) as new com.sun.star.beans.PropertyValue
args19(0).Name = "Protection.Locked"
args19(0).Value = true
args19(1).Name = "Protection.FormulasHidden"
args19(1).Value = false
args19(2).Name = "Protection.Hidden"
args19(2).Value = false
args19(3).Name = "Protection.HiddenInPrintout"
args19(3).Value = false
dispatcher.executeDispatch(document, ".uno:Protection", "", 0, args19())
rem ----------------------------------------------------------------------
dim args20(0) as new com.sun.star.beans.PropertyValue
args20(0).Name = "ToPoint"
args20(0).Value = "$AK$15:$AT$22"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args20())
rem ----------------------------------------------------------------------
dim args21(0) as new com.sun.star.beans.PropertyValue
args21(0).Name = "ToPoint"
args21(0).Value = "$AN$26"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args21())
rem ----------------------------------------------------------------------
dim args22(0) as new com.sun.star.beans.PropertyValue
args22(0).Name = "ToPoint"
args22(0).Value = "$AT$10"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args22())
rem ----------------------------------------------------------------------
dim args23(3) as new com.sun.star.beans.PropertyValue
args23(0).Name = "Protection.Locked"
args23(0).Value = true
args23(1).Name = "Protection.FormulasHidden"
args23(1).Value = false
args23(2).Name = "Protection.Hidden"
args23(2).Value = false
args23(3).Name = "Protection.HiddenInPrintout"
args23(3).Value = false
dispatcher.executeDispatch(document, ".uno:Protection", "", 0, args23())
rem ----------------------------------------------------------------------
dim args24(0) as new com.sun.star.beans.PropertyValue
args24(0).Name = "ToPoint"
args24(0).Value = "$BD$10"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args24())
rem ----------------------------------------------------------------------
dim args25(3) as new com.sun.star.beans.PropertyValue
args25(0).Name = "Protection.Locked"
args25(0).Value = true
args25(1).Name = "Protection.FormulasHidden"
args25(1).Value = false
args25(2).Name = "Protection.Hidden"
args25(2).Value = false
args25(3).Name = "Protection.HiddenInPrintout"
args25(3).Value = false
dispatcher.executeDispatch(document, ".uno:Protection", "", 0, args25())
rem ----------------------------------------------------------------------
dim args26(0) as new com.sun.star.beans.PropertyValue
args26(0).Name = "ToPoint"
args26(0).Value = "$AK$15:$AT$22"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args26())
rem ----------------------------------------------------------------------
dim args27(3) as new com.sun.star.beans.PropertyValue
args27(0).Name = "Protection.Locked"
args27(0).Value = true
args27(1).Name = "Protection.FormulasHidden"
args27(1).Value = false
args27(2).Name = "Protection.Hidden"
args27(2).Value = false
args27(3).Name = "Protection.HiddenInPrintout"
args27(3).Value = false
dispatcher.executeDispatch(document, ".uno:Protection", "", 0, args27())
rem ----------------------------------------------------------------------
dim args28(0) as new com.sun.star.beans.PropertyValue
args28(0).Name = "ToPoint"
args28(0).Value = "$AU$15:$BD$18"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args28())
rem ----------------------------------------------------------------------
dim args29(3) as new com.sun.star.beans.PropertyValue
args29(0).Name = "Protection.Locked"
args29(0).Value = true
args29(1).Name = "Protection.FormulasHidden"
args29(1).Value = false
args29(2).Name = "Protection.Hidden"
args29(2).Value = false
args29(3).Name = "Protection.HiddenInPrintout"
args29(3).Value = false
dispatcher.executeDispatch(document, ".uno:Protection", "", 0, args29())
rem ----------------------------------------------------------------------
dim args30(0) as new com.sun.star.beans.PropertyValue
args30(0).Name = "ToPoint"
args30(0).Value = "$AW$19:$AX$22"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args30())
rem ----------------------------------------------------------------------
dim args31(3) as new com.sun.star.beans.PropertyValue
args31(0).Name = "Protection.Locked"
args31(0).Value = true
args31(1).Name = "Protection.FormulasHidden"
args31(1).Value = false
args31(2).Name = "Protection.Hidden"
args31(2).Value = false
args31(3).Name = "Protection.HiddenInPrintout"
args31(3).Value = false
dispatcher.executeDispatch(document, ".uno:Protection", "", 0, args31())
rem ----------------------------------------------------------------------
dim args32(0) as new com.sun.star.beans.PropertyValue
args32(0).Name = "ToPoint"
args32(0).Value = "$AY$22:$BD$22"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args32())
rem ----------------------------------------------------------------------
dim args33(3) as new com.sun.star.beans.PropertyValue
args33(0).Name = "Protection.Locked"
args33(0).Value = true
args33(1).Name = "Protection.FormulasHidden"
args33(1).Value = false
args33(2).Name = "Protection.Hidden"
args33(2).Value = false
args33(3).Name = "Protection.HiddenInPrintout"
args33(3).Value = false
dispatcher.executeDispatch(document, ".uno:Protection", "", 0, args33())
rem ----------------------------------------------------------------------
dim args34(0) as new com.sun.star.beans.PropertyValue
args34(0).Name = "ToPoint"
args34(0).Value = "$AU$23"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args34())
rem ----------------------------------------------------------------------
dim args35(3) as new com.sun.star.beans.PropertyValue
args35(0).Name = "Protection.Locked"
args35(0).Value = true
args35(1).Name = "Protection.FormulasHidden"
args35(1).Value = false
args35(2).Name = "Protection.Hidden"
args35(2).Value = false
args35(3).Name = "Protection.HiddenInPrintout"
args35(3).Value = false
dispatcher.executeDispatch(document, ".uno:Protection", "", 0, args35())
rem ----------------------------------------------------------------------
dim args36(0) as new com.sun.star.beans.PropertyValue
args36(0).Name = "ToPoint"
args36(0).Value = "$AY$23"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args36())
rem ----------------------------------------------------------------------
rem dispatcher.executeDispatch(document, ".uno:FormatCellDialog", "", 0, Array())
rem ----------------------------------------------------------------------
dim args38(0) as new com.sun.star.beans.PropertyValue
args38(0).Name = "ToPoint"
args38(0).Value = "$AT$27"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args38())
rem ----------------------------------------------------------------------
dim args39(3) as new com.sun.star.beans.PropertyValue
args39(0).Name = "Protection.Locked"
args39(0).Value = true
args39(1).Name = "Protection.FormulasHidden"
args39(1).Value = false
args39(2).Name = "Protection.Hidden"
args39(2).Value = false
args39(3).Name = "Protection.HiddenInPrintout"
args39(3).Value = false
dispatcher.executeDispatch(document, ".uno:Protection", "", 0, args39())
rem ----------------------------------------------------------------------
dim args40(0) as new com.sun.star.beans.PropertyValue
args40(0).Name = "ToPoint"
args40(0).Value = "$AK$32:$BD$39"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args40())
rem ----------------------------------------------------------------------
dim args41(3) as new com.sun.star.beans.PropertyValue
args41(0).Name = "Protection.Locked"
args41(0).Value = true
args41(1).Name = "Protection.FormulasHidden"
args41(1).Value = false
args41(2).Name = "Protection.Hidden"
args41(2).Value = false
args41(3).Name = "Protection.HiddenInPrintout"
args41(3).Value = false
dispatcher.executeDispatch(document, ".uno:Protection", "", 0, args41())
rem ----------------------------------------------------------------------
dim args42(0) as new com.sun.star.beans.PropertyValue
args42(0).Name = "ToPoint"
args42(0).Value = "$AK$41"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args42())
rem ----------------------------------------------------------------------
dim args43(3) as new com.sun.star.beans.PropertyValue
args43(0).Name = "Protection.Locked"
args43(0).Value = true
args43(1).Name = "Protection.FormulasHidden"
args43(1).Value = false
args43(2).Name = "Protection.Hidden"
args43(2).Value = false
args43(3).Name = "Protection.HiddenInPrintout"
args43(3).Value = false
dispatcher.executeDispatch(document, ".uno:Protection", "", 0, args43())
rem ----------------------------------------------------------------------
dim args44(0) as new com.sun.star.beans.PropertyValue
args44(0).Name = "ToPoint"
args44(0).Value = "$C$9"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args44())
rem ----------------------------------------------------------------------
dim args45(0) as new com.sun.star.beans.PropertyValue
args45(0).Name = "Protect"
args45(0).Value = true
dispatcher.executeDispatch(document, ".uno:Protect", "ah01", 0, args45())
end sub