How do I go about printing the contents of a mshflexgrid?
Printable View
How do I go about printing the contents of a mshflexgrid?
You have to use nested loops for the rows and cols, the .textmatrix property to read the cell contents.
can you post an example pls? ive never used this before..
This should get you started.
VB Code:
dim C as Long dim R as Long dim str as String For R = 0 to Grid.Rows -1 For C = 0 to Grid.Cols -1 str = str & Grid.TextMatrix(R, C) & vbtab Next C Printer.Print str str = "" Next R
Make sure you invoke the EndDoc method to commence printing
Printer.EndDoc