+ Reply to Thread
Results 1 to 8 of 8

Change the file name within the code rapidly

  1. #1
    Forum Contributor Bob@Sun's Avatar
    Join Date
    09-03-2009
    Location
    Montuak, Usa
    MS-Off Ver
    Excel 2007
    Posts
    438

    Change the file name within the code rapidly

    Hello guys,

    I am almost at the end of my project and I need final help.

    I have 3 files in total: “The Main” one where the primary data is entered and then one called "Warehouse-September09" and one called "Orders-September09"

    I The Main File the code separates the information based on that if the product is delivered directly to the client or goes first in the warehouse. So within the code I have in many places the name of the both files. Besides that the file "Warehouse-September09" also includes code to distribute the products from the warehouses to the clients in the file "Orders-September09.”

    Because I am changing the suffix of the file name every moth, I was wondering if there is a way to change the name of both files rapidly in the code. I tried with Find and Replace function but if there is another way it will be great.

    Thanks for the help!

  2. #2
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161

    Re: Change the file name within the code rapidly

    You could change the name slightly to be flexible i.e Orders-September09 could just be "Orders - " then you can use a formatted date to change the names like this:
    Please Login or Register  to view this content.
    Not all forums are the same - seek and you shall find

  3. #3
    Forum Contributor Bob@Sun's Avatar
    Join Date
    09-03-2009
    Location
    Montuak, Usa
    MS-Off Ver
    Excel 2007
    Posts
    438

    Re: Change the file name within the code rapidly

    I cant realy understand how to do it.

    I am attaching sample files. Can you please do it with those files or explain it in more details.

    Thanks!
    Attached Files Attached Files

  4. #4
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161

    Re: Change the file name within the code rapidly

    I only looked at one file, took this code from it and made the change
    Please Login or Register  to view this content.
    You should see how to work it in to the other workbook

  5. #5
    Forum Contributor Bob@Sun's Avatar
    Join Date
    09-03-2009
    Location
    Montuak, Usa
    MS-Off Ver
    Excel 2007
    Posts
    438

    Re: Change the file name within the code rapidly

    Sorry, but as my original file is a little bit more complicated I can't get it to wotk.

    Please help me to work this around with my original file that I am attaching.


    Thanks!
    Attached Files Attached Files

  6. #6
    Forum Contributor Bob@Sun's Avatar
    Join Date
    09-03-2009
    Location
    Montuak, Usa
    MS-Off Ver
    Excel 2007
    Posts
    438

    Re: Change the file name within the code rapidly

    Please Help!!

  7. #7
    Forum Contributor Bob@Sun's Avatar
    Join Date
    09-03-2009
    Location
    Montuak, Usa
    MS-Off Ver
    Excel 2007
    Posts
    438

    Re: Change the file name within the code rapidly

    Can Anybody Please Help with this issue!

    Thanks

  8. #8
    Forum Contributor Bob@Sun's Avatar
    Join Date
    09-03-2009
    Location
    Montuak, Usa
    MS-Off Ver
    Excel 2007
    Posts
    438

    Re: Change the file name within the code rapidly

    Hello there,

    I still count on your help to solve this issue!

    Thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1