Stephan Wunderlich wrote:
Hi,

When I record a macro that do an operation in several cells this only work when I'm recording it. Later, when I execute this only work for the first cell.

what exactly did you try to record ? Maybe the code the recorder produced could give an insight too.

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 ?

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to