Get Buttons Column & Row Before Execution

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
Tpub250
Posts: 9
Joined: Fri Dec 18, 2020 10:12 pm

Get Buttons Column & Row Before Execution

Post by Tpub250 »

So I have created a few buttons with static references (sheet, Column|Row)
2 buttons are copy to clipboard & one is a direct link (currently working)
The (Column|Row) the button is in on sheet "Worksheet", is getting contents in the same Column|Row as the reference sheet "Shipping". Currently static though
I need to copy the buttons down many rows.
So I need to Keep the sheet reference static, but in the code, when the button is selected It needs to get the buttons position (Column|Row), then execute the rest of the macro.

I have attached a sample file
Thanks for looking
Terry
Attachments
Floating_Buttons_Example.ods
(42.18 KiB) Downloaded 109 times
OpenOffice 4.1.7
Windows 10
User avatar
Mr.Dandy
Posts: 427
Joined: Tue Dec 11, 2012 4:22 pm

Re: Get Buttons Column & Row Before Execution

Post by Mr.Dandy »

OpenOffice 4.1.12 - Windows 10
RPG
Volunteer
Posts: 2250
Joined: Tue Apr 14, 2009 7:15 pm
Location: Netherlands

Re: Get Buttons Column & Row Before Execution

Post by RPG »

I have the idea that working with three buttons on a line is not a good idea. Special the idea to drag them down is a bad idea.
Better is working with only three buttons. Maybe also it is a good idea to work with a toolbar.

When you work with getcurrentselection it can be more easy to work macro's. You can search for getcurrentselection on this forum.
this is one example
viewtopic.php?f=20&t=76370&hilit=oSelection+CellAddress.
LibreOffice 7.1.4.2 on openSUSE Leap 15.2
Post Reply