Workbook.Path

Use this property to get the file path of the workbook.

Syntax Parameters Return value
- - String

SVB Example

Timestamping each item in a workbook

Option Explicit
Option Base 1
Sub Main

    Dim newanalysis As Analysis
    Set newanalysis = Analysis (scBasicStatistics, Application.Open(Application.Path & "\Examples\Datasets\Cat Clinic.sta"))

    With newanalysis.Dialog
        .Statistics = scBasDescriptives
    End With

    newanalysis.Run

    With newanalysis.Dialog
        .Variables = "3 6 9"
        .PairwiseDeletionOfMD = True
        .DisplayLongVariableNames = False
        .ExtendedPrecisionCalculations = False
        .PlotMedianQuartileRange = False
        .PlotMeanSEAndSD = False
        .PlotMeanSD196TimesSD = True
        .PlotMeanSE196TimesSE = False
        .UserDefinedPercentiles = False
        .ValidN = True
        .Mean = True
        .Median = False
        .Mode = False
        .GeometricMean = False
        .HarmonicMean = False
        .ConfLimitsForMeans = False
        .Sum = False
        .StandardDeviation = True
        .Variance = False
        .StandardErrorOfMean = False
        .MinimumMaximum = True
        .LowerUpperQuartiles = False
        .Range = False
        .QuartileRange = False
        .Skewness = False
        .Kurtosis = False
        .StandardErrorOfSkewness = False
        .StandardErrorOfKurtosis = False
        .UseNumberOfIntervals = True
        .NumberOfIntervals = 10
        .NormalExpectedFrequencies = False
        .KSAndLillieforsTestForNormality = True
        .ShapiroWilkWTest = False
        .ConfidenceIntervalForMeansPlot = 95
        .CompressedStemAndLeaf = False
    End With

    newanalysis.RouteOutput(newanalysis.Dialog.Summary).Visible = True

    newanalysis.RouteOutput(newanalysis.Dialog.Histograms).Visible = True

    newanalysis.Dialog.ResultsVariables = "6 | 9"
    newanalysis.RouteOutput(newanalysis.Dialog.Scatterplot2D).Visible = True

    Dim CurrentItem As WorkbookItem
    Set CurrentItem = ActiveWorkbook.Root
    While (TypeName(CurrentItem) <> "Nothing")
        Set CurrentItem = ActiveWorkbook.NextItem(CurrentItem)
        If TypeName(CurrentItem) = "Nothing" Then Exit While
        If CurrentItem.Type <> scWorkbookItemTypeFolder Then
            CurrentItem.Name = CurrentItem.Name & " " & Now
        End If
    Wend

End Sub