Hello all. I have a very basic newbie question please.
Working in calc and been creating a macro. I have a loop setup that creates new sheets which seems to be working. There are up to 20 columns that will have different text in each row.
For example: B1 would have Tom, C1 would have David, D1 would have Mike, and so on. This location will always be the same but the names will change ever so often. It would only be used when there are new set of names in the cells. What I have also working is that it will copy the text from B1, create the new sheet with the unique name(text), and then start the loop again.
One thing I have not been able to figure out is how to advance from B1 to C1 after the loop starts again. I am thinking that GetCellbyPosition( 0, 0 ) would be the way to do this? Can you put variable where the 0's are is like n, where n = n +1 and l = l+1 to have this: GetCellbyPosition( n, l )
Please let me know if I am on the right track for this.
Thanks,
Dennis
[Solved] Jump to next Column and Row - OOo Basic
-
- Posts: 10
- Joined: Sun Aug 21, 2016 1:24 am
[Solved] Jump to next Column and Row - OOo Basic
Last edited by ddavis1086 on Wed Aug 31, 2016 11:20 pm, edited 1 time in total.
OpenOffice 4.1.2 on CentOS
Re: Jump to next Column and Row - OOo Basic
Yes, you can use variables as the parameters of getCellbyPosition(). You might want to have two loops, one to move among the sheets and one inside of that to move across the columns.
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
-
- Posts: 10
- Joined: Sun Aug 21, 2016 1:24 am
Re: Jump to next Column and Row - OOo Basic
Thank you, thank you. That is really good idea and I will work on adding that. I have no one else in the office that can help with this so it's a learn as you go project.
Dennis
Dennis
OpenOffice 4.1.2 on CentOS