+ Reply to Thread
Results 1 to 12 of 12

Copy Last Modified file to Specific Folder

  1. #1
    Forum Contributor
    Join Date
    12-18-2019
    Location
    chennai
    MS-Off Ver
    excel 2010
    Posts
    141

    Post Copy Last Modified file to Specific Folder

    Original Code was taken from the below thread, code provided by Mr.Sintek thanks to him

    https://www.excelforum.com/excel-pro...fic-sheet.html

    I am trying to save last modified file to another path. below are the code based on the above thread.

    but i am getting error while saving the file on new folder

    Please Login or Register  to view this content.

    End Sub

  2. #2
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,191

    Re: Copy Last Modified file to Specific Folder

    You have omitted some code...This from other thread...

    Change Path to ToPath
    Please Login or Register  to view this content.
    Last edited by sintek; 05-25-2020 at 07:28 AM.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  3. #3
    Forum Contributor
    Join Date
    12-18-2019
    Location
    chennai
    MS-Off Ver
    excel 2010
    Posts
    141

    Re: Copy Last Modified file to Specific Folder

    Hi Sintek yes this is from some other thread. but requirement is different. I am trying to find last modified file from path and then want to save this in another path.

    Here i am getting error . This (Lfile) i want to save in ToPAth.

    With Workbook.Open(LFile)

    .Copy Path & FSO.GetBaseName(LFile),Topath

  4. #4
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,191

    Re: Copy Last Modified file to Specific Folder

    Are you saving a copy to other path or just moving the whole file to another path

  5. #5
    Forum Contributor
    Join Date
    12-18-2019
    Location
    chennai
    MS-Off Ver
    excel 2010
    Posts
    141

    Re: Copy Last Modified file to Specific Folder

    Hi Sintek, making a copy to another path

  6. #6
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,191

    Re: Copy Last Modified file to Specific Folder

    Post 2 solves...

    Why are you having input box for path change...Why not Application.FileDialog(msoFileDialogFolderPicker)
    Last edited by sintek; 05-25-2020 at 07:46 AM.

  7. #7
    Forum Contributor
    Join Date
    12-18-2019
    Location
    chennai
    MS-Off Ver
    excel 2010
    Posts
    141

    Re: Copy Last Modified file to Specific Folder

    Hi Sintek. Thanks for your support. Can you please help me to save the file without opening, want to exclude this With Workbooks.Open(LFile)

    i tried with the below code but its failed

    .Copy Path & FSO.GetBaseName(LFile),Topath

  8. #8
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,191

    Re: Copy Last Modified file to Specific Folder

    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    12-18-2019
    Location
    chennai
    MS-Off Ver
    excel 2010
    Posts
    141

    Re: Copy Last Modified file to Specific Folder

    thank you so much Sintek. Its worked

  10. #10
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,191

    Re: Copy Last Modified file to Specific Folder

    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember......Mark Thread as Solved.

  11. #11
    Forum Contributor
    Join Date
    12-18-2019
    Location
    chennai
    MS-Off Ver
    excel 2010
    Posts
    141

    Re: Copy Last Modified file to Specific Folder

    Why are you having input box for path change...Why not Application.FileDialog(msoFileDialogFolderPicker)
    @ mostly its Default folder, so doing through input box instead selecting manually

  12. #12
    Forum Contributor
    Join Date
    12-18-2019
    Location
    chennai
    MS-Off Ver
    excel 2010
    Posts
    141

    Re: Copy Last Modified file to Specific Folder

    Thread marked as resolved. Rep Added

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Function That Checks Folder for a File Last Modified Today
    By peabnguyen in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-18-2020, 07:17 PM
  2. Pull Date Modified from file folder
    By KColgrove in forum Excel General
    Replies: 1
    Last Post: 05-22-2019, 11:46 PM
  3. Replies: 0
    Last Post: 01-21-2014, 10:52 AM
  4. [SOLVED] Macro that opens last modified file in folder
    By forfiett in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-19-2013, 09:56 PM
  5. Retrieve File names from a folder with last modified username
    By elavarasans in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-10-2013, 12:48 PM
  6. Code to pick up the last modified file in a folder
    By mccrimmon in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-19-2007, 08:57 AM
  7. Replies: 1
    Last Post: 02-21-2006, 12:55 AM

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