I have found some macros in this forum. While testing them, I found out that I get error during "for each" loop.
I have found another code in wiki pages of openoffice, which contains "for each" loop, I received the same error.
I tried some other ways but no joy. Somehow I keep getting error.
Do you might have any idea about where I might be wrong?
Here is the code below, originally from(https://wiki.openoffice.org/wiki/Docume ... s#For_Each)
Code: Select all
SUB TEST_VARIABLE
Const d1 = 2
Const d2 = 3
Const d3 = 2
Dim i
Dim a(d1, d2, d3)
For Each i In a()
' ... Inner part of loop
Next i
END SUB