+ Reply to Thread
Results 1 to 3 of 3

Dialogue box to select folder >files for import?

  1. #1
    Registered User
    Join Date
    09-03-2007
    Posts
    12

    Dialogue box to select folder >files for import?

    Hi,

    The below code imports seperate csv's from "C:\Temp\OTC_Files\", then populates the workbook with each csv becoming a worksheet. Is it possible to amend the code to present the user with a dialogue box where they can browse to the folder containing the files, then select the necessary files? I've tried a few different methods but seem to be making a mess of the code rather than progress... any help would be great.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Good morning firebladejr
    Quote Originally Posted by firebladejr
    Is it possible to amend the code to present the user with a dialogue box where they can browse to the folder containing the files, then select the necessary files?
    You need to have a look at the GetOpenFilename function in VBA help :
    Please Login or Register  to view this content.
    The code above will ask you to choose a file, and dump the path / filename into the variable f, for you to do with as you please.

    HTH

    DominicB
    Please familiarise yourself with the rules before posting. You can find them here.

  3. #3
    Registered User
    Join Date
    01-07-2008
    Location
    Northampton, UK
    MS-Off Ver
    version 2212, office 365 enterprise
    Posts
    74
    This is the code I use, I thought it may be of use to you:

    Please Login or Register  to view this content.
    Ne auderis delere orbem rigidum meum!

+ 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