Consulting

Results 1 to 20 of 162

Thread: File Dialog-Browse/Save/Append

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #11
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,297
    Location
    Andy, the problem is with how you ask Dir to find your files.
    I have changed this line

    FileFound = Dir(sDest & CheckFile(i) & "*.*")

    to

    FileFound = Dir(sDest & "*" & CheckFile(i) & "*.*")

    and it now finds
    123456TESTMAINabcd
    however it finds the first version of TestMain, opens it and then appends the data to it.
    So we are now back to how does the VBA code know which is the correct TESTMAIN for it to append to.
    I can change it to iterate through all of them and append the data to them all, but that is hardly efficient.
    Which is why I asked you if you know the names of the Master files why aren't those names in a table so that the VBA can know the correct table to append to, you would not even need to find it.
    Last edited by OBP; 07-24-2017 at 01:18 AM.

Posting Permissions

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