| View previous topic :: View next topic |
| Author |
Message |
emilie General User

Joined: 26 Jun 2004 Posts: 5 Location: paris
|
Posted: Sat Jun 26, 2004 11:22 am Post subject: multi selection |
|
|
wish to obtain the data of zone selected by the user. This functions work very well when I am on only one page. But that does not work, when I have mutiple pages of selected.
oSelRange = oCurr.getRangeAddress --- propertie or method not find
Can you help me ?
Sub CancellaRigheVuote
Dim iStartCol As Integer
Dim iStartRow As Integer
Dim iEndCol As Integer
Dim iEndRow As Integer
Dim oDoc As Object
Dim oSelection As Object
Dim oSheet As Object
oDoc = ThisComponent
If Not oDoc.SupportsService("com.sun.star.sheet.SpreadsheetDocument") Then
Msgbox "Bad document"
Exit Sub
End If
oSelection = oDoc.currentSelection
If oSelection.supportsService("com.sun.star.sheet.SheetCellRanges") Then
Msgbox "Multiple selection ERROR"
Exit Sub
End If
oSheet = oSelection.Spreadsheet
With oSelection.RangeAddress
iStartCol = .StartColumn
iStartRow =.StartRow
iEndCol = .EndColumn
iEndRow = .EndRow
End With
Print iStartCol,iStartRow,iEndCol,iEndRow
End Sub |
|
| Back to top |
|
 |
pitonyak Administrator


Joined: 09 Mar 2004 Posts: 3618 Location: Columbus, Ohio, USA
|
Posted: Mon Jun 28, 2004 10:46 am Post subject: |
|
|
Hi Emilie,
I do not understand what you mean by having more than one page selected. Your code shows that you are using a Calc document. Do you mean more than one "sheet"? _________________ --
Andrew Pitonyak
http://www.pitonyak.org/oo.php |
|
| Back to top |
|
 |
|