property Items.FormatCell([Item as Variant], [ColIndex as Variant]) as String
Specifies the custom format to display the cell's content.

   Item as Variant A long expression that indicates the handle of the item.  
   ColIndex as Variant A long expression that indicates the column's index, a string expression that indicates the column's key or the column's caption.  
   String A string expression that indicates the format to be applied on the cell's value, including HTML formatting, if the cell supports it.  
By default, the FormatCell property is empty.  The format is being applied if valid ( not empty, and syntactically correct ). The expression may be a combination of variables, constants, strings, dates and operators, and value. The value operator gives the value to be formatted.  A string is delimited by ", ` or ' characters, and inside they can have the starting character preceded by \ character, ie "\"This is a quote\"". A date is delimited by # character, ie #1/31/2001 10:00# means the January 31th, 2001, 10:00 AM. The FormatColumn property applies the predefined format for all cells in the columns. The CellValue property indicates the cell's value.

The CellValue property of the cell is being shown as:

In other words, all cells applies the format of the FormatColumn property, excepts the cells with the FormatCell property being set. If the cell belongs to a column with the FireFormatColumn property on True, the Value parameter of the FormatColumn event shows the newly caption for the cell to be shown. 

For instance:

The value keyword in the FormatColumn property indicates the value to be formatted. 

The expression supports cell's identifiers as follows:

The expression supports auto-numbering predefined operators as follows:

This property/method supports predefined constants and operators/functions as described here.


Send comments on this topic.
1999-2017 Exontrol.COM, Software. All rights reserved.