+ Reply to Thread
Results 1 to 7 of 7

Choose folder for sheet import

  1. #1
    Registered User
    Join Date
    01-26-2011
    Location
    Canada
    MS-Off Ver
    Office 365
    Posts
    49

    Choose folder for sheet import

    Good Day!

    My apologies in advance, I am not good at VBA and please need your help.

    I have a macro that imports a specific sheet from a bunch of excel files in a specific folder:

    Please Login or Register  to view this content.
    The code is set to consider all XLSMs in the folder C:\Imports. What I would like to do instead is to prompt the user which folder to import from. I found a code online that does that, but unfortunately I don't understand how to combine my Sub with this function:

    Please Login or Register  to view this content.
    Thank you for your time!

    Cheers

    Maike

  2. #2
    Forum Expert Doc.AElstein's Avatar
    Join Date
    05-23-2014
    Location
    '_- Germany >Outside Building things.... Mostly
    MS-Off Ver
    Office 2003 2007 2010 PC but Not mac. XP and Vista mostly, sometimes Win 7
    Posts
    3,618

    Re: Choose folder for sheet import

    Hi Maike,
    I think this will do it

    Please Login or Register  to view this content.
    Alan
    '_- Google first, like this _ site:ExcelForum.com Gamut
    Use Code Tags: Highlight code; click on the # icon above,
    Post screenshots COPYABLE to a Spredsheet; NOT IMAGES PLEASE
    http://www.excelforum.com/the-water-...ml#post4109080
    https://app.box.com/s/gjpa8mk8ko4vkwcke3ig2w8z2wkfvrtv
    http://excelmatters.com/excel-forums/ ( Scrolll down to bottom )

  3. #3
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Choose folder for sheet import

    Maybe:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  4. #4
    Forum Expert Doc.AElstein's Avatar
    Join Date
    05-23-2014
    Location
    '_- Germany >Outside Building things.... Mostly
    MS-Off Ver
    Office 2003 2007 2010 PC but Not mac. XP and Vista mostly, sometimes Win 7
    Posts
    3,618

    Re: Choose folder for sheet import

    Quote Originally Posted by xladept View Post
    Maybe: ....SourceFolder=GetFolder
    Ok Ok .. I missed the obvious again
    never mind

  5. #5
    Registered User
    Join Date
    01-26-2011
    Location
    Canada
    MS-Off Ver
    Office 365
    Posts
    49

    Re: Choose folder for sheet import

    Quote Originally Posted by xladept View Post
    Maybe:

    Please Login or Register  to view this content.
    Oh my.. it's that easy? I feel like a real dummy right now :D Thank you so much XLAdept!

  6. #6
    Registered User
    Join Date
    01-26-2011
    Location
    Canada
    MS-Off Ver
    Office 365
    Posts
    49

    Re: Choose folder for sheet import

    Quote Originally Posted by Doc.AElstein View Post
    Ok Ok .. I missed the obvious again
    never mind
    Thank you for your help!

  7. #7
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Choose folder for sheet import

    You're welcome and thanks for the rep!

+ 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 Pictures From Folder To Excel Sheet...help
    By unnikrishnan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-10-2016, 04:02 AM
  2. Choose a Folder and Loop a Sub for all files in the chosen folder
    By smartbuyer in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-11-2016, 10:57 PM
  3. [SOLVED] Choose a folder and loop through all files in the chosen folder
    By smartbuyer in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-10-2016, 11:19 PM
  4. Replies: 12
    Last Post: 03-09-2015, 05:52 PM
  5. Replies: 0
    Last Post: 06-17-2013, 05:33 AM
  6. import as sheet form the same folder as the worksheet
    By meacho in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 07-31-2007, 01:58 PM
  7. Replies: 1
    Last Post: 01-24-2006, 12:25 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