+ Reply to Thread
Results 1 to 14 of 14

importing latest version of a file

  1. #1
    Forum Contributor
    Join Date
    10-04-2010
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    455

    importing latest version of a file

    Hello,

    I'm having trouble with the filepath of a saved file i wish to import (example of the file name format below). The import file will always be named "DATA" then date then time report was run. I need to import the last report run within specific month folder.

    K:\2011\02 Feb\DATA_20110203_1644.xls

    Code i'd use to import the specific file:
    Please Login or Register  to view this content.
    Last edited by pike; 02-19-2011 at 02:51 AM.

  2. #2
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: import macro with changing filename

    Hi Gti182

    you can modify leiths code herehttp://www.excelforum.com/excel-prog...-a-folder.html
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  3. #3
    Forum Contributor
    Join Date
    10-04-2010
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    455

    Re: import macro with changing filename

    thanks pike, had a long look and a bit of a play around but i'm not sure that i'm on the level to tailor his code to my situation. Could anybody else maybe suggest simpler?
    Last edited by Gti182; 02-17-2011 at 11:00 AM.

  4. #4
    Forum Contributor
    Join Date
    10-04-2010
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    455

    Re: importing latest version of a file (changing filename)

    up please

  5. #5
    Forum Contributor
    Join Date
    10-04-2010
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    455

    Re: importing latest version of a file (changing filename)

    friday bump! Please boffins need help on this in a big way!

  6. #6
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: importing latest version of a file

    try....
    Please Login or Register  to view this content.

  7. #7
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: importing latest version of a file

    ops you will need to change

    Please Login or Register  to view this content.
    to

    Please Login or Register  to view this content.
    and the pattern to

    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    10-04-2010
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    455

    Re: importing latest version of a file

    Thanks Pike, I applied the macro and it ran through all the code but nothing happned? Did i apply the "Call Macro" function correctly?

    Please Login or Register  to view this content.

    Please Login or Register  to view this content.

  9. #9
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: importing latest version of a file

    Hi Gti182

    what happen with?
    Please Login or Register  to view this content.

  10. #10
    Forum Contributor
    Join Date
    10-04-2010
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    455

    Re: importing latest version of a file

    Quote Originally Posted by pike View Post
    Hi Gti182

    what happen with?
    Please Login or Register  to view this content.
    getting a compile error: Invalid or unqualified reference on the bold text above.

    Im thinking i should throw in the towel on this one

  11. #11
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: importing latest version of a file

    does this open the lastest file?
    Please Login or Register  to view this content.

  12. #12
    Forum Contributor
    Join Date
    10-04-2010
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    455

    Re: importing latest version of a file

    get a new error now

    run-time error '438':
    Object doesnt support this property or method

    on line
    Please Login or Register  to view this content.

  13. #13
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: importing latest version of a file

    hmm. did check the code but
    Please Login or Register  to view this content.

  14. #14
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: importing latest version of a file

    More checking ...Try this to open the last modified or saved "DATA ???? .xls" in the folder

    Please Login or Register  to view this content.

+ 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