GridLineWidth Property Example
The example increments the width of gridlines in a grid with each click of the mouse. To try this example, draw a grid on a form, paste this code into the Declarations section of the form, and then press F5 to run the program.
Sub Grid1_Click ()
If Grid1.GridLineWidth < 10 Then
' Increment width.
Grid1.GridLineWidth = Grid1.GridLineWidth + 1
Else
Grid1.GridLineWidth = 1 ' Set width back to 1.
End If
End Sub