+ Reply to Thread
Results 1 to 2 of 2

List files in directory of the active workbook

  1. #1
    Forum Contributor
    Join Date
    03-02-2014
    Location
    usa
    MS-Off Ver
    MS 365
    Posts
    593

    List files in directory of the active workbook

    Hello,
    I am using this code to get the list of files in the active workbook directory:
    Please Login or Register  to view this content.
    I am getting Run-Time error 52 " Bad File name or number".

    What is wrong here?
    Thanks

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: List files in directory of the active workbook

    Your close quote is too early, needs to be at the very end. Also just use a quote character instead of the character code. The character code will work, but it obfuscates the VBA code. Inside a quote, you repeat it twice.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ 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. Import all Userforms from a directory into active Excel Workbook?
    By Chris Tuttle in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-16-2015, 09:20 PM
  2. [SOLVED] Macro to Import Multiple TXT Files into workbook - User to select files/directory
    By saber007 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-15-2013, 08:43 PM
  3. Check list of usernames in Active Directory
    By tgschaef in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-02-2012, 08:09 AM
  4. List Groups a User is a Member of - Active Directory
    By tomlancaster in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-13-2011, 04:10 PM
  5. Distribution List on Active directory
    By Vincent.Eymard in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-30-2010, 12:55 PM
  6. VBA List Groups a User is a Member of in Active Directory
    By tomlancaster in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-03-2010, 04:41 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