Code : Tout sélectionner
Function Column_Row(N As Integer)
Dim oSheet As Object
Dim oCursor As Object
Dim fin_ligne As Long
Dim fin_colonne As Long
Dim resultat As Variant
oSheet = ThisComponent.Sheets.getByName("Feuille1")
ocursor = oSheet.createCursor()
oCursor.GotoEndOfUsedArea(True)
fin_ligne = oCursor.RangeAddress.EndRow
fin_colonne = oCursor.RangeAddress.EndColumn
'ReDim resultat(0 to 1)
resultat = Array(fin_ligne,fin_colonne)
Column_Row = resultat(N)
End Function
Merci par avance et bonne nuit.