AcceptLabelsInFormulas Property

Microsoft Excel Visual Basic

True if labels can be used in worksheet formulas. The default value is False. Read/write Boolean.

expression.AcceptLabelsInFormula

expression    Required. An expression that returns one of the objects in the Applies To list.

Example

This example sets the AcceptLabelsInFormulas property for the active workbook and then sets cells B1:D1 on worksheet one to be column labels.

ActiveWorkbook.AcceptLabelsInFormulas = True
Worksheets(1).Range("b1:d1").FormulaLabel = xlColumnLabels