+ Reply to Thread
Results 1 to 10 of 10

macro to select path to collect data from

  1. #1
    Registered User
    Join Date
    09-14-2004
    Posts
    21

    macro to select path to collect data from

    Hi , i have a macro , done with the help of this forum that colects data from seeveral files in one folder that is hard coded in the macro, what i would like now is to have the possibility to select the working folder to work
    attatched the files i have now

    The macro i have is

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by clixo; 10-26-2010 at 11:44 AM.

  2. #2
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: macro to select path to collect data from

    You can use this code to prompt someone to select a folder:

    Please Login or Register  to view this content.

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  3. #3
    Registered User
    Join Date
    09-14-2004
    Posts
    21

    Re: macro to select path to collect data from

    Thanks Dom, but how can i join the code you sent to my macro ? ... i am really a noob in vba .....

  4. #4
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: macro to select path to collect data from

    Not tested but think this should do it:

    Please Login or Register  to view this content.

    Dom

  5. #5
    Registered User
    Join Date
    09-14-2004
    Posts
    21

    Re: macro to select path to collect data from

    Thanks Dom , i tested and it did not worked... seams not be opening the folder i choose.

  6. #6
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: macro to select path to collect data from

    Small but important correction to this line:

    Please Login or Register  to view this content.

    Dom

  7. #7
    Registered User
    Join Date
    09-14-2004
    Posts
    21

    Re: macro to select path to collect data from

    Hi again .. its almost there , the sub folders are not stored in the path, i. e if i select c:\2010\test\*.xls, the macro gets c:\2010\*.xls .

  8. #8
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: macro to select path to collect data from

    It should either select the displayed folder or if you highlight one include that.

    Noticed this will need changing as well though:

    Please Login or Register  to view this content.

    Dom

  9. #9
    Registered User
    Join Date
    09-14-2004
    Posts
    21

    Re: macro to select path to collect data from

    Now it works !!!
    Thanks !

  10. #10
    Registered User
    Join Date
    09-14-2004
    Posts
    21

    Re: macro to select path to collect data from

    this is how it looks at the end :

    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