[Solved] How to select the entire row of a table?
[Solved] How to select the entire row of a table?
In the speadsheet file,I wanna get the entire row of a table by clicking mouse,but I don't know how to do it in OpenOffice basic.
In Microsoft VBA,I can use 'Application.inputbox' to select a table range,but OpenOffice basic has not a given function like this.
I'm looking forward to your help.
Thank you.
In Microsoft VBA,I can use 'Application.inputbox' to select a table range,but OpenOffice basic has not a given function like this.
I'm looking forward to your help.
Thank you.
Last edited by Collytze on Wed Dec 21, 2022 12:21 am, edited 1 time in total.
LibreOffice 4.7 on Windows
Re: How to select the entire row of a table?
Sorry, I see now it is a StarBasic + API related question.
You must study the API of the OpenOffice. Start with Anrew Pitonyak's free macro books.
https://www.pitonyak.org/oo.php
Sometimes - when you vant to control a whole row by a macro, you not needed to select (highlight) the row visually. It is enough to get the Row object. You must get the actual Spereadsheet document first, for example:
Code: Select all
oDoc = Thiscomponent
Finally you will able to get the Row, CellRange or Cell object.
I suggest you to download, install and use one of the excellent Object Inspection Tools: XrayTool or MRI. Then you will able to list all of the existing properties and methods of the programming objects.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Re: How to select the entire row of a table?
Thanks for your answer. I got what you mean.
If I need creating a dialog function that a dialogbox appears with the selection information displayed in the dialogbox and the table rows can be selected by the user when the code runs, rather than pre-specified in the code?
Could you help me build a function like this?
If I need creating a dialog function that a dialogbox appears with the selection information displayed in the dialogbox and the table rows can be selected by the user when the code runs, rather than pre-specified in the code?
Could you help me build a function like this?
LibreOffice 4.7 on Windows
Re: How to select the entire row of a table?
You can select the row(s) (visually, by usage of the user interface) only before or after macro running.the table rows can be selected by the user when the code runs,
You can control the rows by their number if you apply a drop-down selector with the row number during the macro running.
Do you want to fill some rows with some data by usage the macro and the dialog boxes on a Form?
Do you know about the built-in Calc feature named "Form"? Available from the menu (of the LibreOffice): Data - Form... it is for fill-in cellranges row-by-row.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Re: How to select the entire row of a table?
Please study the free Macro books first. And there are many sample codes related to the Forms and the Form control elements on the Forums.Could you help me build a function like this?
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Re: How to select the entire row of a table?
This will show a normal input box then if you input an address such as D6:G6 it will select that.
Code: Select all
sub InputBoxForCellRange
res = inputbox("Input cell range address")
with thiscomponent.currentcontroller
A = .activesheet.getCellRangeByName(res)
.select(A)
end with
end sub
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Re: How to select the entire row of a table?
Thanks for your reply.I know this way, but it seems that selecting the table area by mouse is more intuitive than typing the address.Probably that's my personal feeling.
LibreOffice 4.7 on Windows
Re: How to select the entire row of a table?
Now, I'm confused as to what you're asking? If it has nothing to do with macros and you just want to select a row with the mouse, you click the row number on the left of the spreadsheet.
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Re: How to select the entire row of a table?
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice