Hi,
sub borrarSeleccionMultiple
dim document as object
dim dispatcher as object
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "ToPoint"
args1(0).Value = "$B$5"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args1())
dim args2(0) as new com.sun.star.beans.PropertyValue
args2(0).Name = "Flags"
args2(0).Value = "SVDFN"
dispatcher.executeDispatch(document, ".uno:Delete", "", 0, args2())
end sub
This is the generated code. The problem is that I say to do the same
operation in cells B5, B7 & B11. Need I to write the code each time I
need something similar ?
well the given code snippet wanders to Cell B5 and then deletes the
contents ... something similar and for all your three Cells does
'all is the sum of all css.sheet.CellFlags
all = 895
xSheet = ThisComponent.Sheets(0)
xCellRange = xSheet.getCellRangeByName("B5")
xCellRange.clearContents(all)
xCellRange = xSheet.getCellRangeByName("B7")
xCellRange.clearContents(all)
xCellRange = xSheet.getCellRangeByName("B11")
xCellRange.clearContents(all)
Hope that helps
Regards
Stephan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]