La Web del Programador: Comunidad de Programadores
 
    Pregunta:  23805 - COMO IMPRIMIR UN MSFLEXGRID
Autor:  Pedro Taggio
Hola

Estoy realizando un programa en visual basic el cual mande llamar bases de datos y realize reportes en sql, las cuales mando a un msflexgrid para mostrar solo las consultas que se deseen en forma de lista ¿como puedo mandar a impresora el contenido de un msflexgrid y si es posible con las lineas o cuadricula? gracias

saludos

  Respuesta:  Miguel Angel Perez Barria
de esta menera lo hago:

Printer.Print
Printer.FontSize = 7
With Form1
For Imprime = 1 To .Grid1.Rows - 1
.Grid1.Row = Imprime
.Grid1.Col = 0
Printer.Print Tab(3); .Grid1.Text;
.Grid1.Col = 1
Printer.Print Tab(23); .Grid1.Text;
.Grid1.Col = 2
Printer.Print Tab(35); .Grid1.Text;
.Grid1.Col = 3
Printer.Print Tab(78); .Grid1.Text;
.Grid1.Col = 4
Printer.Print Tab(93); .Grid1.Text;
.Grid1.Col = 5
Printer.Print Tab(112); .Grid1.Text;
.Grid1.Col = 7
Printer.Print Tab(155); .Grid1.Text;
.Grid1.Col = 8
Printer.Print Tab(175); .Grid1.Text;
.Grid1.Col = 9
Printer.Print Tab(205); .Grid1.Text;
Next
End With
Printer.EndDoc

en este caso el MsFlexgrid lo llamo Grid.
en relacion al leneado no te sabria decir como hacerlo pero si lo puedes hacer con el printer.line para hacer el cuadriculado. ojala te sirva esta ayuda