Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Loop - comando de repetição finita

I don't know why the macro I recorded is giving error! I added the "Do .. Loop Until" command to the end of the macro.

Below is an attached template sheet.

.

In A1: A6

= INT (RAND () * 2)

In A7

= SUM (A1: A6)

.

Sub Main
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 ----------------------------------------------------------------------
args1(0).Name = "ToPoint"
args1(0).Value = "$Sheet1.$A$7"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args1())

Do
    ThisComponent.calculateAll()
Loop Until args1(0).Value = 0
End Sub

.

Grato pela atenção!

Orlando Souza

8)

.

Loop - comando de repetição finita

I don't know why the macro I recorded is giving error! I added the "Do .. Loop Until" command to the end of the macro.

Below is an attached template sheet.

.

In A1: A6

= INT (RAND () * 2)

In A7

= SUM (A1: A6)

.

Sub Main
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 ----------------------------------------------------------------------
args1(0).Name = "ToPoint"
args1(0).Value = "$Sheet1.$A$7"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args1())

Do
    ThisComponent.calculateAll()
Loop Until args1(0).Value = 0
End Sub

Loop finito

.

Grato pela atenção!

Orlando Souza

8)

.

Loop - comando de repetição finita

I don't know why the macro I recorded is giving error! I added the "Do .. Loop Until" command to the end of the macro.

Below is an attached template sheet.

.

In A1: A6

= INT (RAND () * 2)

In A7

= SUM (A1: A6)

.

Sub Main
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 ----------------------------------------------------------------------
args1(0).Name = "ToPoint"
args1(0).Value = "$Sheet1.$A$7"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args1())

Do
    ThisComponent.calculateAll()
Loop Until args1(0).Value = 0
End Sub

Loop finitoFinite Loop

.

Grato pela atenção!

Orlando Souza

8)

.

Loop - comando de repetição finita

I don't know why the macro I recorded is giving error! I added the "Do .. Loop Until" command to the end of the macro.

Below is an attached template sheet.

In A1: A6

= INT (RAND () * 2)

In A7

= SUM (A1: A6)

Sub Main
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 ----------------------------------------------------------------------
args1(0).Name = "ToPoint"
args1(0).Value = "$Sheet1.$A$7"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args1())

Do
    ThisComponent.calculateAll()
Loop Until args1(0).Value = 0
End Sub

Finite Loop

Grato pela atenção!

Orlando Souza

8)

.

Loop - comando de repetição finita

I don't know why the macro I recorded is giving error! I added the "Do .. Loop Until" command to the end of the macro.

Below is an attached template sheet.

In A1: A6

= INT (RAND () * 2)

In A7

= SUM (A1: A6)

Sub Main
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 ----------------------------------------------------------------------
args1(0).Name = "ToPoint"
args1(0).Value = "$Sheet1.$A$7"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args1())

Do
    ThisComponent.calculateAll()
Loop Until args1(0).Value = 0
End Sub

Finite Loop

Grato pela atenção!

Orlando Souza

8)

Loop - comando de repetição finitaFinite Repeat Command

I don't know why the macro I recorded is giving error! I added the "Do .. Loop Until" command to the end of the macro.

Below is an attached template sheet.

In A1: A6

= INT (RAND () * 2)

In A7

= SUM (A1: A6)

Sub Main
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 ----------------------------------------------------------------------
args1(0).Name = "ToPoint"
args1(0).Value = "$Sheet1.$A$7"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args1())

Do
    ThisComponent.calculateAll()
Loop Until args1(0).Value = 0
End Sub

Finite Loop

Grato pela atenção!Grateful for the attention!

Orlando Souza

8)

Loop - Finite Repeat Command

I don't know why the macro I recorded is giving error! I added the "Do .. Loop Until" command to the end of the macro.

The macro's function is to stop the sum in cell A7 when the result equals 0 (zero).

Below is an attached template sheet.

In A1: A6

= INT (RAND () * 2)

In A7

= SUM (A1: A6)

Sub Main
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 ----------------------------------------------------------------------
args1(0).Name = "ToPoint"
args1(0).Value = "$Sheet1.$A$7"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args1())

Do
    ThisComponent.calculateAll()
Loop Until args1(0).Value = 0
End Sub

Finite Loop

Grateful for the attention!

Orlando Souza

8)

Loop - Finite Repeat Command

I don't know why the macro I recorded is giving error! I added the "Do .. Loop Until" command to the end of the macro.

The macro's function is to stop the sum in cell A7 when the result equals 0 (zero).

Below is an attached template sheet.

In A1: A6

= INT (RAND () * 2)

In A7

= SUM (A1: A6)

Sub Main
dim document   as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
Dim args1(0) as new com.sun.star.beans.PropertyValue
document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
rem ----------------------------------------------------------------------
args1(0).Name = "ToPoint"
args1(0).Value = "$Sheet1.$A$7"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args1())

Do
    ThisComponent.calculateAll()
Loop Until args1(0).Value = 0
End Sub

Finite LoopLoop (atualizado)

Grateful for the attention!

Orlando Souza

8)

Loop - Finite Repeat Command

I don't know why the macro I recorded is giving error! I added the "Do .. Loop Until" command to the end of the macro.

The macro's function is to stop the sum in cell A7 when the result equals 0 (zero).

Below is an attached template sheet.

In A1: A6

= INT (RAND () * 2)

In A7

= SUM (A1: A6)

Sub Main
dim document   as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
Dim args1(0) as new com.sun.star.beans.PropertyValue
document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
rem ----------------------------------------------------------------------
args1(0).Name = "ToPoint"
args1(0).Value = "$Sheet1.$A$7"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args1())

Do
    ThisComponent.calculateAll()
Loop Until args1(0).Value = 0
End Sub

Finite Loop (atualizado)(updated)

Grateful for the attention!

Orlando Souza

8)

Loop - Finite Repeat Command

I don't know why the macro I recorded is giving error! I added the "Do .. Loop Until" command to the end of the macro.

The macro's function is to stop the sum in cell A7 when the result equals 0 (zero).

Below is an attached template sheet.

In A1: A6

= INT (RAND () * 2)

In A7

= SUM (A1: A6)

Sub Main
dim document   as object
dim dispatcher as object
dim args1(0) as new com.sun.star.beans.PropertyValue
rem ----------------------------------------------------------------------
rem get access to the document
Dim args1(0) as new com.sun.star.beans.PropertyValue
document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
rem ----------------------------------------------------------------------
args1(0).Name = "ToPoint"
args1(0).Value = "$Sheet1.$A$7"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args1())

Do
    ThisComponent.calculateAll()
Loop Until args1(0).Value = 0
End Sub

Finite Loop (updated)

Grateful for the attention!

Orlando Souza

8)

Loop - Finite Repeat Command

I don't know why the macro I recorded is giving error! I added the "Do .. Loop Until" command to the end of the macro.

The macro's function is to stop the sum in cell A7 when the result equals 0 (zero).

Below is an attached template sheet.

In A1: A6

= INT (RAND () * 2)

In A7

= SUM (A1: A6)

Sub Main
dim document   as object
dim dispatcher as object
dim args1(0) as new com.sun.star.beans.PropertyValue
rem ----------------------------------------------------------------------
rem get access to the document
document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
rem ----------------------------------------------------------------------
args1(0).Name = "ToPoint"
args1(0).Value = "$Sheet1.$A$7"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args1())

Do
    ThisComponent.calculateAll()
Loop Until args1(0).Value = 0
End Sub

Finite Loop (updated)

Grateful for the attention!

Orlando Souza

8)

Loop - Finite Repeat Command

I don't know why the macro I recorded is giving error! I added the "Do .. Loop Until" command to the end of the macro.

The macro's function is to stop the sum in cell A7 when the result equals 0 (zero).

Below is an attached template sheet.

In A1: A6

= INT (RAND () * 2)

In A7

= SUM (A1: A6)

Sub Main
dim document   as object
dim dispatcher as object
dim args1(0) as new com.sun.star.beans.PropertyValue
rem ----------------------------------------------------------------------
rem get access to the document
document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
rem ----------------------------------------------------------------------
args1(0).Name = "ToPoint"
args1(0).Value = "$Sheet1.$A$7"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args1())

Do
    ThisComponent.calculateAll()
Loop Until args1(0).Value = 0
End Sub

Finite Loop (updated)

Grateful for the attention!

Orlando Souza

8)