<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_UNCONFIRMED "
title="UNCONFIRMED - BASIC error '91' on iCount = ActiveChart.SeriesCollection.Count"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=111303">111303</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>BASIC error '91' on iCount = ActiveChart.SeriesCollection.Count
</td>
</tr>
<tr>
<th>Product</th>
<td>LibreOffice
</td>
</tr>
<tr>
<th>Version</th>
<td>5.4.0.3 release
</td>
</tr>
<tr>
<th>Hardware</th>
<td>x86-64 (AMD64)
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows (All)
</td>
</tr>
<tr>
<th>Status</th>
<td>UNCONFIRMED
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>BASIC
</td>
</tr>
<tr>
<th>Assignee</th>
<td>libreoffice-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>bernard.schleich@gmail.com
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="http://bugs.documentfoundation.org/attachment.cgi?id=135092" name="attach_135092" title="Calc file with macros">attachment 135092</a> <a href="http://bugs.documentfoundation.org/attachment.cgi?id=135092&action=edit" title="Calc file with macros">[details]</a></span>
Calc file with macros
I use for the first time a macro defined in Excel 2007.
The macro crash on the following line
iCount = ActiveChart.SeriesCollection.Count
with the following error's message translated from french
BASIC Execution Error '91'
Object variable not defined.
I have replaced iCount = ... by iCount = 0 and the line is executed, so that
I'm pretty sure that the problem is caused by the expression ActiveChart.
I have tried to use IMMEDIATE Window on LibreOffice but I don't find it on
LibreOffice !!!
I have attached my original file without personal DATA.
The macro is started in calling "ComputeTableMensuelle" and crash when line
iCount = ... is executed in CleqrChqrt() function.
'*************************************************************************
'* ClearChart
'*************************************************************************
Sub ClearChart()
Sheets(xSheet + 1).Select
Application.ScreenUpdating = False
'ActiveSheet.ChartObjects(1).Activate
iCount = ActiveChart.SeriesCollection.Count
Do While iCount > 1
ActiveChart.SeriesCollection(2).Delete
iCount = iCount - 1
Loop
Sheets(xSheet + 2).Select
Application.ScreenUpdating = False
'ActiveSheet.ChartObjects(1).Activate
iCount = ActiveChart.SeriesCollection.Count
Do While iCount > 1
ActiveChart.SeriesCollection(2).Delete
iCount = iCount - 1
Loop
Sheets(1).Select
End Sub</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>