HighLight Property

See Also13I3GQJ              Example2MW28C3>Low

Applies To



Determines whether selected cells appear highlighted.


[form.]grid.Highlight[ = { True|False}]


The HighLight property settings are:

Setting         Description


True             (Default) Selected cells are highlighted.

False             Selected cells are not highlighted.



When this property is set to False and the user selects a range of cells, there is no visual cue that shows which cells are currently selected.

Data Type

IntegerDOKXHY (Boolean)

See Also


Col, Row PropertiesL43H93


Programmer's Guide:

Chapter 3, "Creating and Using Controls"

HighLight Property Example

The example turns the highlighting on and off as you click the form.  To try this example, create a new project, add GRID.VBX using the Add File command on the File menu, and then draw a grid.  Copy the code into the Declarations section and press F5 to run the program.

Sub Form_Load ()

   Grid1.Cols = 6   ' Set columns and rows.

   Grid1.Rows = 7

End Sub


Sub Form_Click ()   ' Toggle highlighting on and off.

   Grid1.HighLight = Not Grid1.HighLight

End Sub