[Libreoffice-bugs] [Bug 111303] New: BASIC error '91' on iCount = ActiveChart.SeriesCollection.Count

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Thu Aug 3 07:31:42 UTC 2017


https://bugs.documentfoundation.org/show_bug.cgi?id=111303

            Bug ID: 111303
           Summary: BASIC error '91' on iCount =
                    ActiveChart.SeriesCollection.Count
           Product: LibreOffice
           Version: 5.4.0.3 release
          Hardware: x86-64 (AMD64)
                OS: Windows (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: BASIC
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: bernard.schleich at gmail.com

Created attachment 135092
  --> https://bugs.documentfoundation.org/attachment.cgi?id=135092&action=edit
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

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20170803/6824aa44/attachment-0001.html>


More information about the Libreoffice-bugs mailing list