Et d'autres éléments de réponse dans la doc traduite d'A. Pitonyak ici:
http://fr.openoffice.org/Documentation/Guides/Indexguide.html
avant-dernier guide :-)

Mathias
2006/1/12, Jovial <[EMAIL PROTECTED]>:
> J'apporte une correction
>
> > If  MonDoc.CurrentSelection.rows.count >1 then: Erreur une zone peut
> > contenir une seule ligen
>
> à remplacer par: (X1-X2)+(Y1-Y2) <> 0 then
>
> _La macro:_
>
> Sub AdresseCoordZone
>     MonDoc = ThisComponent
>     Selection = MonDoc.CurrentSelection
>
>     SelectRange = Selection.RangeAddress
>     NomFeuille = MonDoc.sheets(SelectRange.sheet).name
>     'Coordonnées
>     X1 = SelectRange.StartColumn
>     Y1 = SelectRange.StartRow
>     X2 = SelectRange.EndColumn
>     Y2 = SelectRange.EndRow
>     'Adresse
>     AdrSelection = AdrCell(X1, Y1) '1ére cellule
>     if  (X1-X2)+(Y1-Y2) <> 0 then
>         AdrSelection = AdrSelection & ":" & AdrCell(X2,Y2)
>     End if
>
>     print X1, Y1, X2, Y2
>     print NomFeuille & "." & AdrSelection
> End sub
>
> Function AdrCell(X as long, Y as long) as String
>     Dim param as variant , AccesFonction as object
>     AccesFonction = createUnoService("com.sun.star.sheet.FunctionAccess")
>     param = Array(Y+1,X+1,4)
>     AdrCell = AccesFonction.CallFunction("ADDRESS",param())
> End function
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Répondre à