You could use something similar to the following to step through each cell in the grid and send the Text of that cell to the printer object. When actually used, I put in additional code to handle page count (based on total rows in flexgrid) and printing page headers/footer, etc.
With frmGrid.flxData ' Flex grid with data
For intRow = 1 To intRecCount ' Loop for each line to print.
.Row = intRow ' Set flex grid row.
Printer.Print Space(5);
For intCol = 0 To intLastCol ' Last col var previously set
.Col = intCol ' Set flex grid Column.
If (.ColWidth(intCol) <> 0) Then
' Only print data that is visible in flex grid
Printer.Print .Text & vbTab;
End If
Next
Printer.Print
Next
End With
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.