Home > BSPrinter documentation > Reference

Add Method

Applies to: GridReportStyles object

  Return Type:     None.  
   In     Required     NewStyle     As     GridReportStyle  
   In     Optional     Before     As     Variant  
   In     Optional     After     As     Variant  


Add a new style to the collection. The style object must be previously created.

Example code:

    Dim Style As GridReportStyle
    Set Style = New GridReportStyle
    Style.DrawColumnsDataLines = False
    Style.DrawRowLines = True
    Style.RowLinesColor = vbCyan
    Style.Name = "My style"
    PrintPreview1.GridReportStyles.Add Style

The CreateNew method also adds a new style, but creates it in one line by setting its properties.