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

This code to delete a range of cells dont' run!!! why?

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


Joined: 27 Jan 2006
Posts: 26
Location: Dakar (SENEGAL)

PostPosted: Sun Feb 26, 2006 8:21 am    Post subject: This code to delete a range of cells dont' run!!! why? Reply with quote

I wrrite this code to delete a rangne of Cells. But It don't run. I Try to know why.


sub Main
Dim oDocument As Object
Dim Spreadsheet As Object


Set oDocument = ThisComponent
Set Spreadsheet = oDocument.Sheets.getByIndex(0)


REM adresse source (UNO struct)
Dim mRangeAddress_src1 as New com.sun.star.table.CellRangeAddress

With mRangeAddress_src1
.Sheet=0
.StartColumn = 1
.StartRow = 1
.EndColumn = 2
.EndRow = 2
End With


removeRange(mRangeAddress_src1, LEFT)


end sub
_________________
I love work.
Back to top
View user's profile Send private message
Marinus
OOo Advocate
OOo Advocate


Joined: 07 Nov 2004
Posts: 261

PostPosted: Sun Feb 26, 2006 8:49 am    Post subject: Reply with quote

See recent post at

http://www.oooforum.org/forum/viewtopic.phtml?t=32394
Back to top
View user's profile Send private message Visit poster's website
B Marcelly
Super User
Super User


Joined: 12 May 2004
Posts: 1453
Location: France

PostPosted: Sun Feb 26, 2006 9:10 am    Post subject: Reply with quote

The last instruction is invalid. This is probably correct:
Code:
Spreadsheet.removeRange(mRangeAddress_src1, com.sun.star.sheet.CellDeleteMode.LEFT)


_________

Forum Openoffice en franšais -> http://www.forum-openoffice.org/
Back to top
View user's profile Send private message Visit poster's website
noranthon
Super User
Super User


Joined: 07 Jul 2005
Posts: 3318

PostPosted: Sun Feb 26, 2006 7:07 pm    Post subject: Reply with quote

You seem to have opened numerous threads on this single question. Please don't do that. Evil or Very Mad I have posted the code you need to this thread.
Back to top
View user's profile Send private message
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