Results 1 to 3 of 3

Thread: Collection class Saving

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Posts
    5

    Post

    I am programming a school project and need to save the data within a collection to a text file (I am not allowed to use access databases) and retrieve it, i would appreciate some help..


    thankyou in advance

  2. #2
    Member
    Join Date
    Jan 1999
    Location
    Longmont,CO
    Posts
    53

    Post

    What data are you trying to retrieve? Is it just collection members or is it data about each collection member? To loop thru a collection, you can use the For Each ..Next like so:

    Dim frm As Form

    For Each frm In Forms
    Debug.Print frm.Name
    Next frm

    This code will loop thru all forms in the Forms collection and print their name to the debug window. If you're defining your own collections, just substitue your object type instead of frm. You can then loop thru every object in your collection and write any object property you want to a text file. See MSDN help on the FileSystemObject and TextStream object for writing to a text file.


    Hope this helps,

    Dan

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Posts
    5

    Post

    thanks, i used a filesystemobject to save the collection data to a text file thankyou ,again


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