Analysis.SelectionConditionSource

This property returns or sets the selection conditions source.

Syntax Return/assignment value
- SelectionConditionSource

SVB Example

Customizing an analysis's selection conditions:

Option Base 1
Option Explicit
Sub main
    Dim newanalysis As Analysis
    'create a new Basic Statistics analysis using the active dataset
    Set newanalysis = Analysis (scBasicStatistics, ActiveDataSet)
    Dim SelCond As SelectionCondition
    'set the analysis selection conditions to the SelCond variable
    Set SelCond = newanalysis.SelectionCondition
    'set the Selection Condition Include list to include only cases
    '1-5 in the analysis
    SelCond.IncludeList = "1:5"
    'enable the selection condition
    SelCond.Enabled = True
    'set the selection condition source option to the analysis
    'instead of those specified within the spreadsheet.
    newanalysis.SelectionConditionSource = scSourceLocal
    'display the analysis, notice that the 'Select Cases' button
    'is enabled
    newanalysis.Visible = True
End Sub