-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Rick,

> I am trying to obtain all the spreadsheet cells which the user can see on the 
> screen.

try:

REM  *****  BASIC  *****
OPTION EXPLICIT

Sub Main

        Dim oDocument as Object
        Dim oController as Object
        Dim oRange as Object
        Dim oRangeAddress as New com.sun.star.table.CellRangeAddress
        
        oDocument = ThisComponent

        If hasUnoInterfaces(oDocument, 
"com.sun.star.sheet.XSpreadsheetDocument") Then
                oController = oDocument.getCurrentController()
                oRangeAddress = oController.getVisibleRange()

                oRange = 
oController.getActiveSheet().getCellRangeByPosition(oRangeAddress.StartColumn,_
                                                                                
                                                     oRangeAddress.StartRow,_
                                                                                
                                                     oRangeAddress.EndColumn,_
                                                                                
                                                     oRangeAddress.EndRow)
                oController.select(oRange)
        EndIf
End Sub

regards

Oliver
- --

GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFELn0bTiyrQM/QSkURAmTHAJ9TihM8lMcDwpHybCF5gD48RLTvlACbBwuC
fv4P0tgJcGsZdREvlxISU8E=
=+Y0l
-----END PGP SIGNATURE-----

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

Reply via email to