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

Joined: 27 Jan 2006 Posts: 26 Location: Dakar (SENEGAL)
|
Posted: Sun Feb 26, 2006 8:21 am Post subject: This code to delete a range of cells dont' run!!! why? |
|
|
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 |
|
 |
Marinus OOo Advocate

Joined: 07 Nov 2004 Posts: 261
|
|
| Back to top |
|
 |
B Marcelly Super User

Joined: 12 May 2004 Posts: 1414 Location: France
|
Posted: Sun Feb 26, 2006 9:10 am Post subject: |
|
|
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 |
|
 |
noranthon Super User

Joined: 07 Jul 2005 Posts: 3318
|
Posted: Sun Feb 26, 2006 7:07 pm Post subject: |
|
|
You seem to have opened numerous threads on this single question. Please don't do that. I have posted the code you need to this thread. |
|
| Back to top |
|
 |
|