+ Reply to Thread
Results 1 to 7 of 7

List files from a directory on a excel worksheet using a macro

  1. #1
    Registered User
    Join Date
    09-10-2012
    Location
    usa
    MS-Off Ver
    Excel 2010
    Posts
    86

    List files from a directory on a excel worksheet using a macro

    need a macro that only lists files in a directory in the following format

    sprint_pcs_general_yyyymmdd or sprint_pcs_general_*

    CURRENTLY USING the below code which is returning all files in the directory. I DONT want that, just files that match a pattern

    Please Login or Register  to view this content.

  2. #2
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: List files from a directory on a excel worksheet using a macro

    Please Login or Register  to view this content.
    Thanks,
    Solus


    Please remember the following:

    1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    Highlight the code in your post and press the # button in the toolbar.
    2. Show appreciation to those who have helped you by clicking below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

    "Slow is smooth, smooth is fast."

  3. #3
    Registered User
    Join Date
    09-10-2012
    Location
    usa
    MS-Off Ver
    Excel 2010
    Posts
    86

    Re: List files from a directory on a excel worksheet using a macro

    runtime error OBJECT required

    Please Login or Register  to view this content.

  4. #4
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: List files from a directory on a excel worksheet using a macro

    Sorry not all of the code posted
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    09-10-2012
    Location
    usa
    MS-Off Ver
    Excel 2010
    Posts
    86

    Re: List files from a directory on a excel worksheet using a macro

    i modified the code and it now works thanks

  6. #6
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: List files from a directory on a excel worksheet using a macro

    I'm glad you found a solution. If you are satisfied with that solution please mark the thread as [SOLVED] using the thread tools at the top.

  7. #7
    Registered User
    Join Date
    09-10-2012
    Location
    usa
    MS-Off Ver
    Excel 2010
    Posts
    86

    Re: List files from a directory on a excel worksheet using a macro

    k how do i close a open file in the format sprint_pcs_general_* using a macro

+ 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. Replies: 5
    Last Post: 11-19-2013, 04:11 PM
  2. Macro to get list of all files in directory
    By boss1982 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-21-2013, 03:18 PM
  3. Excel File Directory - List NEW Files only
    By lilanngel in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-09-2013, 03:54 PM
  4. Excel Macro Code Request for List files and Move specified directory
    By ganeshinscribe in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 03-19-2012, 08:38 AM
  5. Macro to create a directory list (Including Zip files)
    By szumerspirit in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-29-2007, 12:43 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