+ Reply to Thread
Results 1 to 15 of 15

Excel Macro Code Request for List files and Move specified directory

Hybrid View

ganeshinscribe Excel Macro Code Request for... 03-06-2012, 10:09 AM
jaslake Re: Excel Macro Code Request... 03-06-2012, 04:18 PM
ganeshinscribe Re: Excel Macro Code Request... 03-07-2012, 07:23 AM
jaslake Re: Excel Macro Code Request... 03-07-2012, 12:14 PM
ganeshinscribe Re: Excel Macro Code Request... 03-08-2012, 03:21 AM
jaslake Re: Excel Macro Code Request... 03-08-2012, 03:12 PM
ganeshinscribe Re: Excel Macro Code Request... 03-09-2012, 06:00 AM
jaslake Re: Excel Macro Code Request... 03-09-2012, 10:31 AM
ganeshinscribe Re: Excel Macro Code Request... 03-13-2012, 10:19 AM
jaslake Re: Excel Macro Code Request... 03-13-2012, 10:24 AM
ganeshinscribe Re: Excel Macro Code Request... 03-13-2012, 10:30 AM
jaslake Re: Excel Macro Code Request... 03-13-2012, 10:36 AM
jaslake Re: Excel Macro Code Request... 03-13-2012, 10:44 AM
jaslake Re: Excel Macro Code Request... 03-13-2012, 12:50 PM
ganeshinscribe Re: Excel Macro Code Request... 03-19-2012, 08:38 AM
  1. #1
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Excel Macro Code Request for List files and Move specified directory

    Hi ganeshinscribe
    Well, you know, I now get the same error message. Seems, when I was cleaning up the code, I deleted a line that I shouldn't have...sorry about that. In Show_Me code, please insert this line
     With fldr
            .Title = "Select a Folder"
            .AllowMultiSelect = False
            .InitialFileName = "C:\"    '<----- Change this to your start Folder
            .Show                       '<----- Add this line
            On Error Resume Next
            srcFilePath = .SelectedItems(1) & "\"
            On Error GoTo 0
            If .InitialFileName = "" Then
                Exit Sub
            End If
            Range("A6") = srcFilePath
        End With
    
        Set objFolder = objFSO.GetFolder(srcFilePath)
    Let me know of issues.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  2. #2
    Registered User
    Join Date
    02-07-2012
    Location
    Chennai
    MS-Off Ver
    Excel 2007
    Posts
    54

    Re: Excel Macro Code Request for List files and Move specified directory

    Excellent John,

    It was working but folder creating only administrator instead of file name. Please help me to solve this code.

    Please see the picture for your kind reference.

    folder.JPG

    Thanks

  3. #3
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Excel Macro Code Request for List files and Move specified directory

    Hi ganeshinscribe
    In your screen shot I can't see what column A says. Make the column wider so I can see it.

  4. #4
    Registered User
    Join Date
    02-07-2012
    Location
    Chennai
    MS-Off Ver
    Excel 2007
    Posts
    54

    Re: Excel Macro Code Request for List files and Move specified directory

    John,

    I have updated entire folder path in attached image.

    Also, It will work with any directory or path selection from "show me" directory?

    folder1.JPG

    I want to run any directory instead of specified only "C:" is this possible?

    Thanks

  5. #5
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Excel Macro Code Request for List files and Move specified directory

    Hi ganeshinscribe
    I'd like to see your screen shot from Post #9 but with Column A widened so I can see what it says.

  6. #6
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Excel Macro Code Request for List files and Move specified directory

    Hi ganeshinscribe
    Never mind, I see what's happening. I'll need to look at it. I'll get back to you.

+ 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