CellFontName Property Example

The following code sets the text of the current cell to a specific font type whenever the MSHFlexGrid is in focus.

Note   If you are using the MSFlexGrid, substitute "MSHFlexGrid1" with "MSFlexGrid1."

Sub MSHFlexGrid1_GotFocus()
   MSHFlexGrid1.CellFontName =Screen.Fonts(3)
   MSHFlexGrid1.Text =Screen.Fonts(3)   ' Displays font
                                       ' name.
End Sub