+ Reply to Thread
Results 1 to 6 of 6

Pop up box to select file - from specific folder

  1. #1
    Registered User
    Join Date
    08-16-2016
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    88

    Pop up box to select file - from specific folder

    Hi


    I'm using this code to bring up a box to allow a user to select a file.


    Please Login or Register  to view this content.

    However, it always begins at its most highest level of folders and I have to click 4 or 5 folders to get to the files I want to select, is it possible for the pop up box to automatically open at a set folder?

    For example:

    G:\Op\Tee\testfiles\

    then from here I can select the file I want.

    Any ideas?

    Thanks

  2. #2
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Pop up box to select file - from specific folder

    Maybe :
    Please Login or Register  to view this content.
    1. I care dog
    2. I am a loop maniac
    3. Forum rules link : Click here
    3.33. Don't forget to mark the thread as solved, this is important

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Pop up box to select file - from specific folder

    This is how I do it.

    1) Add a reference to MS Object Library:
    MsoFileDialog.jpg

    2) Then this is the code I use:
    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Registered User
    Join Date
    08-16-2016
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    88

    Re: Pop up box to select file - from specific folder

    Hi guys, thanks for the replies! :D :D

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Pop up box to select file - from specific folder

    You can also use ChDir to change the current directory before you show the select file dialog.
    If posting code please use code tags, see here.

  6. #6
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Pop up box to select file - from specific folder

    You are welcome.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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. [SOLVED] Open newest folder and specific file in the folder
    By timtim91 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-09-2017, 11:55 AM
  2. [SOLVED] How to select a file instead of selecting the file's destination path/folder
    By dedark05 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-30-2016, 10:17 PM
  3. Select range page & save under specific folder
    By Cindy9 in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 06-15-2016, 10:55 AM
  4. [SOLVED] Save as xlsm file with specific name & specific folder
    By namialus in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-07-2015, 03:32 AM
  5. Select a file or folder
    By yossel in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-30-2014, 06:17 PM
  6. [SOLVED] Modify existing code to select file instead of select folder
    By Gti182 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-04-2014, 09:41 AM
  7. [SOLVED] Open specific folder, select file to open and copy then paste
    By Kranky in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-22-2012, 12:14 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