2011/10/29 David S. Crampton <david_cramp...@ie2b.com>:
> This question has two parts: simple and more complex:
>
> simple: I wish to read the value of the currently selected cell (in Calc, of
> course) into a variable in the macro language (Libre Basic).  Script example
> please. and thank you!

Sub Main
        Dim x As Double
        x=ThisComponent.getCurrentSelection().getValue()

        Dim y As String
        y=ThisComponent.getCurrentSelection().getFormula()

        Dim z As String
        z=ThisComponent.getCurrentSelection().getString()

        Print x, y, z
End Sub


Kind regards

Johnny Rosenberg
ジョニー・ローゼンバーグ

-- 
For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Reply via email to