Results 1 to 2 of 2

Thread: Incrementing file names on a save? Help Me!!:-)

  1. #1
    Guest

    Post

    I am creating a series of individual txt documents in a vb program. As I create each page I want to save it with a "incrementing" file name. Example, "page#1" "page#2" and so on. How do I get the file name to automatically incremenat? Thanks in advance.

  2. #2
    Addicted Member
    Join Date
    Oct 1999
    Posts
    232

    Post

    Try it:

    Dim ok as Boolean
    Dim FileName$, x%

    Do While ok
    FileName = "page" & x & ".txt"
    ...
    x = x + 1
    If IwantFinish Then ok = False
    Loop

    ------------------
    smalig
    smalig@hotmail.com
    http://vbcode.webhostme.com/


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