How to use XGridRowSelection

Hi,
My name is Jorge, is the first time I participate in this forum.

I’m a noob, not a programmer but I’m trying to understand how to use macros on LO
My question is very simple and I need your kindness to explain me how can I use the Uno Interface for this example:

REM Select row 7
Sub SelectRow()    
	DIM Test	
	Test = createUnoService("com.sun.star.awt.grid.UnoControlGrid")	
    Test.selectRow(7)        
End Sub

I get an error and I don’t know what I need to do to solve it:

image description

I already googled it, viewd other macros but can’t understand how to correct it

I’ve already checked in the LibreOffice SDK API Reference but for me misses an example to understand how to use the interface - I know, this is an API Reference…

Could you please help me?

Best regards

Hello,

I believe your understanding of the service is incorrect. com.sun.star.awt.grid.UnoControlGrid is A control that displays a set of tabular data. See this page → service UnoControlGrid.

If you want to see this in working code, see my question here → Looking to create grid (not table) control on Base form. There is a LO Base sample there which contains the code to display dialog which contains the grid control. If Base is not set up on your system, you can still look at the code there.

If you are seriously interested in macros/uno API, check out Open Office Macros Explained by Andrew Pitonyak. PDF here → OOME.

@Ratslinger,
thanks for your answer.
I will look now your links - Thanks!