Syntax

expression.DecimalPlaces

expression A variable that represents a ListDataFormat object.

Remarks

Returns 0 if the setting is not appropriate for decimal places. Returns xlAutomatic (-4105 decimal) if the Microsoft Windows SharePoint Services site is automatically determining the number of decimal places to show in the SharePoint list.

In Excel, you cannot set any of the properties associated with the ListDataFormat object. You can set these properties, however, by modifying the list on the SharePoint site.

Example

The following example returns the setting of the DecimalPlaces property for the third column of a list in Sheet1 of the active workbook.

Visual Basic for Applications
Function GetDecimalPlaces() As Long Dim wrksht As Worksheet Dim objListCol As ListColumn Set wrksht = ActiveWorkbook.Worksheets("Sheet1") Set objListCol = wrksht.ListObjects(1).ListColumns(3) GetDecimalPlaces = objListCol.ListDataFormat.DecimalPlaces End Function
-4105 decimal decimal places DecimalPlaces DecimalPlaces Property

See also: