+ Reply to Thread
Results 1 to 3 of 3

HOW: Open Browse Window, Select File, Copy Filename Selected.

  1. #1
    Registered User
    Join Date
    04-18-2012
    Location
    Italy
    MS-Off Ver
    Excel 2007
    Posts
    9

    HOW: Open Browse Window, Select File, Copy Filename Selected.

    Hi,
    I'm new of this forum and I have a question to solve.

    I have created a user form where I have some TextBox to compile.
    One of this TextBox is used to insert the filename of a file from my pc/directory.

    In this way is very boring to type manually the filename so I would have this behaviour:

    1 - click on this textbox or click on a near button
    2 - this click open the Window Browse
    3 - I select a file
    4 - filename of selected file is copied into my TextBox with in front slash character "/" (example: /image.jpg)

    Then i have another TextBox where I would have the same behaviour of previsious TextBox but here I would select multiple file with CTRL or SHIFT button.
    Selected filenames should be copied into this textBox comma separated with "/" in front each filename.
    Example: /image1.jpg,/image2.jpg,/image3.jpg

    How Can I do this on my userform?

    Regards and thanks a lot for you suport.

    monak83

  2. #2
    Valued Forum Contributor
    Join Date
    12-05-2011
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010 & 2013
    Posts
    308

    Re: HOW: Open Browse Window, Select File, Copy Filename Selected.

    Hi

    The attached file has a userform in it that has the following function:
    - Browse to select folder
    - Builds a listbox of files ending .txt (change the macro code to *.img)
    - The user can then select the files using ctrl+click
    - Import the files.

    You may be able to adjust the code to get what you want.

    Best regards, Rob.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    04-18-2012
    Location
    Italy
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: HOW: Open Browse Window, Select File, Copy Filename Selected.

    Thanks so much for your reply but I need to select files directly from Windows 7 Browse window because I shoud see image preview to select my images.
    Than I need to import filenames into a TextBox.
    I attach my user form to see what I need.
    Thanls so much for your support.
    regards
    monak83
    Attached Images Attached Images

+ 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