Thanks to the respondent to my original message. The suggested code does not
seem to match my Macro code. Please be aware I am a novice at this. Could
that respondent show me the changes needed to the following Macro which was
recorded by the 'Record Macro' function. Am particularly interested in the
Doc.Sheets.getByName ("whatever") format as I find the NR followed by relative
sheet number makes changes in sheet location difficult.
REM ***** BASIC *****
sub ClearSummaryRow
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", "", 0, args1())
rem ----------------------------------------------------------------------
dim args2(0) as new com.sun.star.beans.PropertyValue
args2(0).Name = "ToPoint"
args2(0).Value = "$B$6"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args2())
rem ----------------------------------------------------------------------
dim args3(0) as new com.sun.star.beans.PropertyValue
args3(0).Name = "Flags"
args3(0).Value = "R"
dispatcher.executeDispatch(document, ".uno:DeleteCell", "", 0, args3())
rem ----------------------------------------------------------------------
dim args4(0) as new com.sun.star.beans.PropertyValue
args4(0).Name = "Sel"
args4(0).Value = false
dispatcher.executeDispatch(document, ".uno:GoToStart", "", 0, args4())
rem ----------------------------------------------------------------------
dim args5(0) as new com.sun.star.beans.PropertyValue
args5(0).Name = "Protect"
args5(0).Value = true
dispatcher.executeDispatch(document, ".uno:Protect", "", 0, args5())
end sub
Hugh G Wilkinson
73 A Frankleigh Street
Spreydon, CHCH 8002
Ph: 03 332 0546 Email: [EMAIL PROTECTED]
Mobile: 027 450 8315