Issues with calling Spreadsheet.Close in SVB

Issues with calling Spreadsheet.Close in SVB

book

Article ID: KB0080451

calendar_today

Updated On:

Products Versions
Spotfire Statistica 12.7 and higher

Description

There is a potential problem with Close when there are outstanding references to the spreadsheet's child objects.

For example,

Dim s as spreadsheet

Dim sc as SelectionCondition

sc = s.SelectionCondition

s.Close
 

The call to s.Close causes the spreadsheet to be cleaned up internally and frees the memory associated with the SelectionCondition object. Then when WinWrap attempts to release/cleanup the SelectionCondition object, it can/will crash.

Issue/Introduction

Issues with calling Spreadsheet.Close in SVB

Environment

Windows

Resolution

The following shows an example of a properly formatted s.Close
 

set sc = nothing

s.Close