+ Reply to Thread
Results 1 to 9 of 9

Making a image appear in a pop-up box

  1. #1
    Registered User
    Join Date
    11-08-2014
    Location
    london
    MS-Off Ver
    2013
    Posts
    49

    Making a image appear in a pop-up box

    I currently have some code kindly donated by this forum to place an image into the top of a column cell if click on a cell with a image path in it. It works fine but instead of putting the image in a cell at the top of the column I would really like it to appear in a pop-up window (with some way to easily dismiss/close the window after use). I would be very grateful if anyone could adjust my code (below) to make this behaviour work. Many thanks. Tony


    Please Login or Register  to view this content.
    Last edited by alansidman; 11-08-2014 at 09:56 PM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2509 Win 11
    Posts
    24,994

    Re: Making a image appear in a pop-up box

    Code Tags Added
    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 at http://www.excelforum.com/forum-rule...rum-rules.html



    (Because you are new to the forum, I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    11-08-2014
    Location
    london
    MS-Off Ver
    2013
    Posts
    49

    Re: Making a image appear in a pop-up box

    Sorry and Thanks.

  4. #4
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,551

    Re: Making a image appear in a pop-up box

    I would suggest creating your own msgbox via a userform and embed a pic in the userform
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  5. #5
    Registered User
    Join Date
    11-08-2014
    Location
    london
    MS-Off Ver
    2013
    Posts
    49

    Re: Making a image appear in a pop-up box

    Sorry to ask a dumb question but do you mean that I create a message box user form and copy the code into this form?

    To clarify the way the code I sent works. When you double click on a field it takes the file path and image name from the field. Finds the image and then posts it into a pre-determined excel cell. I want the last step to be a pop up window rather than an excel cell.

    Many thanks

    Tony

  6. #6
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,551

    Re: Making a image appear in a pop-up box

    Yes you can create a userform and use it as your msgbox.

  7. #7
    Registered User
    Join Date
    11-08-2014
    Location
    london
    MS-Off Ver
    2013
    Posts
    49

    Re: Making a image appear in a pop-up box

    Hi Firstly Mike thank you very much for helping me.

    I have managed to get the user form to pop up when I double click on the cell. However that's where it stops.

    I created a userform with a frame object in it. I copied the code from earlier in the post into the frame object. I guess not surprisingly it does not work. As you can tell I am not confident in VBA etc..

    I think the 2 problems are:

    1. I need to change the piece of code that displays the image so it doesn't display in a cell but actually in the popup window.
    2. I need to get the code to be automatically run once the cell is double clicked. I think I must be putting it into the wrong place in the form.

    Is there any chance you could show me the replacement code I need for 1 and the place I need to put the full code in the userform.?

    Sorry to be so dumb.

    Many thanks

    Tony

  8. #8
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,551

    Re: Making a image appear in a pop-up box

    Maybe this use an image control

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    11-08-2014
    Location
    london
    MS-Off Ver
    2013
    Posts
    49

    Re: Making a image appear in a pop-up box

    Great. Thank you

+ 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. Replies: 0
    Last Post: 07-08-2014, 06:27 AM
  2. [SOLVED] VBA to send embedded image in email body- NOT USING THE ORGINAL IMAGE SOURCE
    By Coreyusa in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-27-2013, 06:48 PM
  3. excel 2010 VBA InsertPicInRange only makes shortcut to image instead of copy of image
    By ArjanSpit in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-10-2012, 02:57 PM
  4. Making an image visible/ invisible as cell selection changes
    By deadlyduck in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-08-2011, 07:47 AM
  5. Making a url cell show an image
    By Onestopfanshop in forum Excel General
    Replies: 3
    Last Post: 09-29-2009, 08:09 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