Results 1 to 2 of 2

Thread: Saving a grid to file

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2000
    Location
    uk
    Posts
    20

    Post

    Can anyone give me any pointers on saving an MSFlexiGrid to a file...thanks

    ------------------

  2. #2
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177

    Post

    You didn't specify wether you wanted the output formatted in anyway, so here's a really simple method:
    Code:
    Private Sub Command1_Click()
        Dim iFile As Integer
        Dim iCell As Long
        
        iFile = FreeFile
        Open "C:\Grid.txt" For Output As iFile
        With MSFlexGrid1
            For iCell = 0 To (.Cols * .Rows) - 1
                Print #iFile, .TextArray(iCell)
            Next
        End With
        Close iFile
    End Sub

    ------------------
    Aaron Young
    Analyst Programmer
    [email protected]
    [email protected]


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