NamedRange::NumberFormat Property

 

Gets or sets the format code for the NamedRange control.

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

property Object^ NumberFormat {
	Object^ get();
	void set(Object^ value);
}

Property Value

Type: System::Object^

The format code for the NamedRange control.

This property returns null if all cells in the NamedRange control do not have the same number format.

The format code is the same string as the Format Codes option in the Format Cells dialog box. The Format function uses different format code strings than do the NumberFormat and NumberFormatLocal properties.

The following code example uses the NumberFormat property to format a date string in a NamedRange. The example also uses the NumberFormatLocal property to display the date format in the language of the user.

This example is for a document-level customization.

No code example is currently available or this language may not be supported.
Return to top
Show: