Results 1 to 2 of 2

Thread: Print grid similar Excel

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Mar 2005
    Posts
    2,737

    Print grid similar Excel

    I use this code to print the value from msflexgrid.

    I need to print the value of grid with a border grid similar Excel

    Possible?

    Code:
    Private Sub STAMPA_PATOLOGIE()
    
        R = 1
        
        Printer.Font = "Consolas"
        Printer.Font.Size = 8
    
        Printer.Print vbCrLf & vbCrLf
    
        Printer.Print "ELENCO PATOLOGIE" & vbCrLf & vbCrLf
    
        With MSFlexGrid1
            DoEvents
            For I = 0 To Me.LNP.Caption - 1
                Printer.Print .TextMatrix(R + I, 0) & "-" & .TextMatrix(R + I, 1)
            Next I
            Printer.EndDoc
        End With
    
        Me.Text1.SetFocus
    
    End Sub
    Attached Images Attached Images  

  2. #2
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    6,420

    Re: Print grid similar Excel

    Maybe this old thread can be of any help
    https://www.vbforums.com/showthread....exGrid-Control

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width