XmlMappedRange.FormulaLabel Property

Gets or sets the formula label type for the XmlMappedRange control.

Namespace:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)

Syntax

'Declaration
Property FormulaLabel As XlFormulaLabel
    Get
    Set
XlFormulaLabel FormulaLabel { get; set; }

Property Value

Type: Microsoft.Office.Interop.Excel.XlFormulaLabel
The formula label type for the XmlMappedRange control.

Remarks

The return value of this property can be xlNone if the range contains no labels, or one of the following XlFormulaLabel constants:

Examples

The following code example uses the FormulaLabel property to set an XmlMappedRange to be a column label. This code example assumes that the current worksheet contains an XmlMappedRange named CustomerLastNameCell.

Private Sub ShowFormulaLabel()
    Globals.ThisWorkbook.AcceptLabelsInFormulas = True
    Me.CustomerLastNameCell.FormulaLabel = _
        Excel.XlFormulaLabel.xlColumnLabels
End Sub
private void ShowFormulaLabel()
{
    Globals.ThisWorkbook.AcceptLabelsInFormulas = true;
    this.CustomerLastNameCell.FormulaLabel = 
        Excel.XlFormulaLabel.xlColumnLabels;
}

.NET Framework Security

See Also

Reference

XmlMappedRange Interface

Microsoft.Office.Tools.Excel Namespace