OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

multi selection

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
emilie
General User
General User


Joined: 26 Jun 2004
Posts: 5
Location: paris

PostPosted: Sat Jun 26, 2004 11:22 am    Post subject: multi selection Reply with quote

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
View user's profile Send private message
pitonyak
Administrator
Administrator


Joined: 09 Mar 2004
Posts: 3655
Location: Columbus, Ohio, USA

PostPosted: Mon Jun 28, 2004 10:46 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website AIM Address
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group