Spreadsheet.VariableName

This property returns/sets the name of the specified variable as a string.

Syntax Parameters Return Value
Property Spreadsheet.VariableName( _
    VarNo As Integer) As String
VarNo [in]

Type: Integer

The variable index.

String

SVB Example

Customizing variable names:

Option Base 1
Option Explicit
Sub Main
    Dim spr As Spreadsheet
    'assigns the active spreadsheet to the object spr
    Set spr = ActiveSpreadsheet
    'uppercase all of the variable names in the spreadsheet
    Dim i As Integer
    For i = 1 To spr.NumberOfVariables
        spr.VariableName(i) = UCase(spr.VariableName(i))
    Next i
End Sub