API Documentation > CorelDRAW > 2025-v26 > Layer > IVGLayer
Layer.CreateGridBoxes method
Creates a group of rectangles representing a custom grid on a layer
Syntax:
Function CreateGridBoxes(ByVal Left As Double, ByVal Top As Double, ByVal Right As Double, ByVal Bottom As Double, ByVal Wide As Long, ByVal High As Long) As Shape
Parameters:
Name Type Description
Left
Double
Top
Double
Right
Double
Bottom
Double
Wide
Long
High
Long
Remarks:
The CreateGridBoxes method creates a group of rectangles (similarly to using the Graph Paper tool) at a specified location on a layer.
Examples:
The following VBA example creates a series of rectangles on the active layer, resembling 2 × 3 graph paper.
Sub Test()
ActiveLayer.CreateGridBoxes 0, 0, 5, 5, 2, 3 
End Sub