here is an example of chatgpt answer which looked ok but wasn’t :
Sub CountRowsInFormTable
Dim oDoc As Object
Dim oForm As Object
Dim oTableControl As Object
Dim oTable As Object
Dim nRowCount As Integer
' Get the current document
oDoc = ThisComponent
' Get the form that contains the table
oForm = oDoc.DrawPage.Forms.getByName("MyForm")
' Get the control that represents the table in the form
oTableControl = oForm.getByName("MyTableControl")
' Get the table object from the control's model
oTable = oTableControl.Model
' Get the number of rows in the table
nRowCount = oTable.Rows.Count
' Display the number of rows in a message box
MsgBox "The table has " & nRowCount & " rows."
End Sub
With this exemple the error is property or method not find “.Model”
After a night i realised i could do another way. execute a select to produce an array and iterate over this array.
At this time i don’t have worked since my last question.
A big problem for me with libre office is to find a clear documentation of the basic language…
Thanks a lot for your answers.