+ Reply to Thread
Results 1 to 4 of 4

Code to open a specific folder

  1. #1
    Registered User
    Join Date
    08-21-2014
    Location
    Montreal, Canada
    MS-Off Ver
    2007
    Posts
    6

    Question Code to open a specific folder

    Hope that someone can help,

    I've go a spreadsheet where I enter information for specific product to serve as a sale's sheet.
    The spreadsheet also contains a Macro Button (called "Insert Picture") that opens a folder so that I can select a picture to insert on my spreadsheet in the B8 cell.

    The problem that I have is that when I click the button, it opens a different folder whereas I need it to open as specific picture folder "L:\Pics".

    Does anybody know how I can modify the code so that it always opens my Picture folder ?

    Here is the current code:

    Please Login or Register  to view this content.
    Thanks for any help
    Last edited by petitpiti; 11-20-2014 at 05:56 PM.

  2. #2
    Forum Expert Debraj Roy's Avatar
    Join Date
    09-27-2012
    Location
    New Delhi,India
    MS-Off Ver
    Excel 2013
    Posts
    1,469

    Re: Code to open a specific folder

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Regards!
    =DEC2HEX(3563)

    If you like someone's answer, click the star to give them a reputation point for that answer...

  3. #3
    Valued Forum Contributor
    Join Date
    03-22-2013
    Location
    Australia,NSW, Wirrimbi
    MS-Off Ver
    Excel 2013
    Posts
    1,057

    Re: Code to open a specific folder

    Check this out...

    http://www.excelforum.com/excel-prog...nfilename.html

  4. #4
    Registered User
    Join Date
    08-21-2014
    Location
    Montreal, Canada
    MS-Off Ver
    2007
    Posts
    6

    Re: Code to open a specific folder

    Thanks for the link Apo but since I'm New to VBA and Macros, I'm not quite sure how to make this work.

    I've copied the code at the top of my module but it doesn't seem to work ... not sure that I understand what he means by:

    "Then use this in your macro"

    Please Login or Register  to view this content.
    ... where do I insert this in my code ?

    Thanks for your help

+ 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] Excel VBA code for selecting a folder then search & open specified files in that folder
    By Excelrookie_1 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-27-2021, 03:09 AM
  2. [SOLVED] Macro to open specific folder
    By siobeh in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-16-2013, 04:22 PM
  3. [SOLVED] VBA Code open files in folder, copy text to workbook-Next time folder opened copy only new
    By Bikeman in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-02-2013, 07:59 PM
  4. [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
  5. Open all worksheets in a specific folder
    By beegee in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-09-2008, 06:26 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