+ Reply to Thread
Results 1 to 6 of 6

Userform image browse folder, show preview and save to range

  1. #1
    Registered User
    Join Date
    11-26-2013
    Location
    Zwolle
    MS-Off Ver
    Excel 2007
    Posts
    6

    Userform image browse folder, show preview and save to range

    Hi All,

    Im working on a document for an art gallery. I made an userform to put in data to the assortiment. I also need to save images to the same range.

    Can someone help me on this?

    I need a:
    - browse folder button to select the image file,
    - see a preview in the userform,
    - add data button to save to range..

    I have it on the attachment,

    Thank you in advance
    Attached Files Attached Files

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Userform image browse folder, show preview and save to range

    Hi Mehmet82

    Welcome to the Forum!!

    I've added Command Button 6 to your UserForm (captioned "Get Image") that executes the following Code. The Code assumes your "Picture" Folder is in the same Folder as the Workbook so you'll need to change the Path and Folder Name as appropriate.

    Please Login or Register  to view this content.
    I've added this to the very top of the UserForm Code Module
    Please Login or Register  to view this content.
    I've modified your Private Sub CommandButton1_Click() Code to add a hyperlink to the chosen Picture to Sheet2, Column N.

    Let me know of issues...
    Attached Files Attached Files
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  3. #3
    Registered User
    Join Date
    11-26-2013
    Location
    Zwolle
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Userform image browse folder, show preview and save to range

    Jaslake,

    Thank you so much for helping me out. It looks exactly like I wanted, BUT, I couldnt change the path and foldername. I tried a to change the code, but because its the first time, I couldnt fix it.

    The folder where the pictures are located: C:\Documents and Settings\User\Mijn documenten\Mijn afbeeldingen
    The folder where the workbook is located is C:\Documents and Settings\User\Mijn documenten

    Where do I have to place these info and how?

    I attach the document like I tried to change like you said, but it didnt work .. yet...

    Can you help me out with this last past?

    Thank you so much in advance..

    Regards
    Attached Files Attached Files

  4. #4
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Userform image browse folder, show preview and save to range

    Hi Mehmet82

    That line of Code would be this
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    11-26-2013
    Location
    Zwolle
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Userform image browse folder, show preview and save to range

    Thanks jaslake,

    It work ok now. I just see that it saves the image to range as a link to the original image ( example: Foto0005.jpg )

    Is it possible to save it as an image of thumbnail of the image?

    Or actually I can ask you it on this way:
    Im doing this for an art gallery, with about 1000 pieces of art, so Im also talking about 1000 images on 1 sheet. Is that smart to do it like your way or my way with an image. Becouse the document would have a huge size, maybe 20 MB big.

    There is also an issue that this document can be used on another computer, so the image files have to be stored on that computer too. It looks to me that it needs to save the image ON the worksheet. But then we get the document size problem.

    I have also though about saving it in the comment, but for that we have to create a code for the userform, so that it will create a comment in that row (range) and past the image. That could be the solution for the size.

    Im hopeless thinking about this problem... Do u got any good idea about this ?

  6. #6
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Userform image browse folder, show preview and save to range

    Hi Mehmet82

    I would think, regardless of which approach you take, the Image Files will need to be available to the User. This could perhaps be resolved if your Computers are Networked.

  7. #7
    Registered User
    Join Date
    11-26-2013
    Location
    Zwolle
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Userform image browse folder, show preview and save to range

    Jaslake,

    How can I add the image to range through the userform? Is it possible to add the image directly as a comment, so it will show when I hover over it?

    Regards

+ 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. Show Monthview via Image Click in Userform
    By siobeh in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-05-2013, 11:55 AM
  2. [SOLVED] on load, show image in excel userform web components
    By Megatronixs in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-28-2013, 03:16 AM
  3. preview image in UserForm
    By no_3belas in forum Excel General
    Replies: 3
    Last Post: 07-27-2010, 08:27 PM
  4. Show a chart as an image on userform.
    By collegekid in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-28-2006, 06:10 PM
  5. Looping folder changing - Save Preview Picture
    By Piranha in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-02-2005, 07:33 AM

Tags for this Thread

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