StaCrossTab.PreCreateVariables

When doing a tabulation (unstacking) operation, make an initial pass through the input data file to pre-create the variables needed in the result.

Syntax Parameters Return Value
- - Boolean

SVB Example

Unstacking a dataset:

Option Explicit
Option Base 1
Sub Main
    Dim S1 As Spreadsheet
    Set S1 = Spreadsheets.Open(Path & "\Examples\Datasets\Cat Clinic Patient Info.sta")
    S1.Visible = True
    Dim obj2 As New StaCrossTab
    obj2.SkipMissing = True
    obj2.PreCreateVariables = True
    obj2.PreserveRelativeVariableOrder = True
    obj2.SortOutputVariables = True
    Dim S2 As Spreadsheet
    'Unstack (split) the GENDER variable, so that its codes
    'are now separate variables. 
    Set S2 = obj2.Tabulate(S1, "1", "2", "3", scXTabAggSeparateVariables, scXTabMIDFirst, False, False, "", "", "", "", "", "", 4000)
    S2.Visible = True
End Sub