<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - LibO Calc Macro .getCellRangeByName with named range"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=47479#c7">Comment # 7</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - LibO Calc Macro .getCellRangeByName with named range"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=47479">bug 47479</a>
from <span class="vcard"><a class="email" href="mailto:todventtu@suomi24.fi" title="Buovjaga <todventtu@suomi24.fi>"> <span class="fn">Buovjaga</span></a>
</span></b>
<pre>(In reply to Jeremy from <a href="show_bug.cgi?id=47479#c1">comment #1</a>)
<span class="quote">> I am getting the same error on 4.0.2.2 and previous release. I only get the
> error if I have deleted a range.
> The following code will recreate the problem. Sheet1 has a single range
> defined as "MYRANGE" and there is some data in the following cells.
>
> Sub Main
> Dim oSheet as Object
> DIM cBlock as New com.sun.star.table.CellRangeAddress
> dim myRow as integer
>
> oSheet = ThisComponent.sheets("Sheet1")
> myRow=oSheet.getCellRangeByName("MYRANGE").RAngeAddress.EndRow
>
>
> cBlock.Sheet=0
> cBlock.StartColumn=0
> cBlock.EndColumn=4
> cBlock.StartRow=myRow+1
> cBlock.EndRow=myRow+2
> osheet.removeRange(cBlock, com.sun.star.sheet.CellDeleteMode.UP)
>
> myRow=oSheet.getCellRangeByName("MYRANGE").RAngeAddress.EndRow ' << fails
> here
>
> End Sub</span >
I put numbers in A1-8 and defined A1-A4 as MYRANGE. I ran the macro and it did
not fail. The macro removes two rows after the range.
Is there something I am missing?
Arch Linux 64-bit
Version: 6.4.0.0.alpha0+
Build ID: 37fc9f51a8de11d40632e8cda17ccf1fa4b1f503
CPU threads: 8; OS: Linux 5.2; UI render: default; VCL: gtk3;
Locale: fi-FI (fi_FI.UTF-8); UI-Language: en-US
Calc: threaded
Built on 6 August 2019</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>