Spreadsheet.VariableTextLabels

This function returns three arrays of numeric values, corresponding text labels, and text label descriptions for the specified variable.

Syntax Parameters Return Value
Sub Spreadsheet.VariableTextLabels( _
    VarNo As Integer, _
    ByRef Values As Double(), _
    ByRef Labels As String(), _
    ByRef Descriptions As String())
  • VarNo [in]

The variable.

Type: Variant

  • Values [out]

Array of doubles used to store the returned text label numeric values.

Type: Double()

  • Labels [out]

Array of strings used to store the returned text label text values.

Type: String()

  • Descriptions [out]

Array of Strings used to store the returned text label descriptions.

Type: String()

This function does not return a value.

SVB Example

Retrieving text label information:

Option Base 1
Option Explicit
Sub Main
    'this example was written using the example data file heart.sta
    Dim spr As Spreadsheet
    'assigns the active spreadsheet to the object spr
    Set spr = ActiveSpreadsheet
    Dim values() As Double
    Dim labels() As String
    Dim descriptions() As String
    'place the text label values, labels, and descriptions into their
    'respective arrays.
    spr.VariableTextLabels(1,values(),labels(),descriptions())
    'display the first text label parameters as returned above.
    MsgBox "Value = " + Str(values(1)) & vbCrLf & "Label = " + labels(1) + vbCrLf _
            & "Description = " & descriptions(1),vbOkOnly,"Variable Text Label"
End Sub