again about loop in macro

Hi, is it possible to repeat a dispatcher command for all the cells in a column?
Thanks in advance,

Here is my problem:

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 = “$A$2”
dispatcher.executeDispatch(document, “.uno:GoToCell”, “”, 0, args1())

dispatcher.executeDispatch(document, “.uno:TextToColumns”, “”, 0, Array()) -------> I NEED THIS COMMAND TO BE REPEATED FOR ALL THE CELLS ON THAT COLUMN BUT THIS WORKS FOR ONLY THE CELL at “$A$2”

Change from a single cell to a range of cells. (Change “$A$2” to “$A$2:$A$10”).
It should work for you, but if you still want to loop through each cell individually, then I’ll add a loop.