+ Reply to Thread
Results 1 to 9 of 9

Error 424 - Extracting filename/last author

  1. #1
    Registered User
    Join Date
    09-30-2013
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    85

    Error 424 - Extracting filename/last author

    Evening,

    I have the following code which successfully opens the specified workbook and copies the values to the active workbook, but then gives an error on the line of extracting filename, and when extracting last author. However, the code works fine if I use 'getopenfilename'. Not sure why this is?

    Please Login or Register  to view this content.

    Thanks in advance!

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Error 424 - Extracting filename/last author

    Hi, brad999,

    maybe like this
    Please Login or Register  to view this content.
    I wonder what´s the difference between A60 and A70...

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Registered User
    Join Date
    09-30-2013
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    85

    Re: Error 424 - Extracting filename/last author

    Genius! Didnt know about the .parent. having an effect!

    Thanks HaHoBe. Also, would you happen to know how to modify this code to open a filename at A70, which is stored within a SUBFOLDER of the activeworkbook path, but this subfolder title is unknown? So it would have to search all subfolders within the ActiveWorkbook.Path for that particular filename?

    Thanks again!

  4. #4
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Error 424 - Extracting filename/last author

    Hi, brad999,

    do you mean something like
    Please Login or Register  to view this content.
    Ciao,
    Holger

  5. #5
    Registered User
    Join Date
    09-30-2013
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    85

    Re: Error 424 - Extracting filename/last author

    Thanks HaHoBe! That works as a standalone, however if im adding my code I seem to get errors...this is what I have got,

    Please Login or Register  to view this content.
    sorry just to add...can this work to open a file within multiple subfolders?? is that an easy fix? Thanks a lot!!
    Last edited by brad999; 04-03-2014 at 04:01 PM.

  6. #6
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Error 424 - Extracting filename/last author

    Hi, brad999,

    maybe like this:
    Please Login or Register  to view this content.
    although you may add Exit SUb after the copying as any further copying would overwrite the contents.

    Ciao,
    Holger

  7. #7
    Registered User
    Join Date
    09-30-2013
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    85

    Re: Error 424 - Extracting filename/last author

    Amazing hahobe! Would it possible for this to work to open files within a sub folder, and also open files within 2 sub folders? Could it search both levels of sub folders for a file??

  8. #8
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Error 424 - Extracting filename/last author

    Hi, brad999,

    from what I see from Forums I would like to point out that I would like to get all information concerning the needs at once instead of getting them when a question is solved. Had I known that you want to search several levels of SubFolders I would have picked a different way to work and a different code.

    I will try and work on the issue this weekend.

    Ciao,
    Holger

  9. #9
    Registered User
    Join Date
    09-30-2013
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    85

    Re: Error 424 - Extracting filename/last author

    Ah apologies hahobe! I thought a code to search through 1 subfolder would be very similar to multiple, but should have specified!

    Thanks again,

+ 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. Extracting data from file in directory and extracting filename
    By brad999 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-20-2014, 11:21 AM
  2. Extracting characters from a work book filename
    By jshaw82 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-17-2013, 02:10 PM
  3. Extracting the folder name and filename from a file path?
    By Skywalker in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-25-2012, 08:17 PM
  4. Extracting the filename from application.getopenfilename
    By Skyway in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-06-2008, 12:13 PM
  5. [SOLVED] Extracting filename
    By Nigel in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-23-2005, 03:06 PM

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