Results 1 to 27 of 27

Thread: Loading Into an MSFlexGrid

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2004
    Location
    Computer
    Posts
    56

    Loading Into an MSFlexGrid

    Alright, well I have a MSFlexGrid on the form, and I have a function set up that saves everything in the FlexGrid to a file in a certain format. How would I be able to load the saved file back into the FlexGrid? This is this format it saves in:
    Code:
    First Section's Data, Second Section's Data ,
    Here is the code used to save:
    Code:
    Public Function SaveFlex(FileName As String)
    'First, open the file
    Open FileName For Output As #1
    iRows = MSFlexGrid1.Rows
    iCols = MSFlexGrid1.Cols
    For i = 0 To iRows - 1
      For j = 0 To iCols - 1
        If IsNumeric(MSFlexGrid1.TextMatrix(i, j)) Then
          Print #1, CCur(MSFlexGrid1.TextMatrix(i, j)); ",";
        Else
          Print #1, MSFlexGrid1.TextMatrix(i, j); ",";
        End If
      Next j
      Print #1, 'Finish the current row.
    Next i
    Close #1 'Close the file
    End Function
    Thanks in advaned!
    JLTL
    Last edited by jltl; Aug 2nd, 2005 at 10:26 PM.
    ~!~Computer Nerd~!~

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