+ Reply to Thread
Results 1 to 7 of 7

Show picture in cell according to combobox selection

  1. #1
    Forum Contributor
    Join Date
    06-12-2006
    Location
    Portugal
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    212

    Show picture in cell according to combobox selection

    Hello to all,
    I have a workbook with a sheet (Flags.xlsx uploaded) containing the country name (A), ISO code (B) and flags (C) (pictures).
    On a userform I have a combobox populated with the ISO codes.
    I would like to populate an image control on the userform according to the value selected on the combobox.
    I have googled around but found no solution.
    Can this be accomplished using VBA?
    Many thanks for any kind help
    Octavio
    Attached Files Attached Files

  2. #2
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Show picture in cell according to combobox selection

    Hello oteixeira,

    Your sample workbook is incomplete. I would suggest you upload a sample workbook, showing us your, userform complete with Code, and exactly where you would like us to assist.

    Thank you.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  3. #3
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,692

    Re: Show picture in cell according to combobox selection

    It would make things simpler if the flags were named as the ISO values. This could easily be done with code.
    But I don't know if that is allowed.
    The inherent weakness of the liberal society: a too rosy view of humanity.

  4. #4
    Forum Contributor
    Join Date
    06-12-2006
    Location
    Portugal
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    212

    Re: Show picture in cell according to combobox selection

    Hello to all,
    I’m now uploading the macro-enabled file with the UserForm containing the Combobox and the image control.
    My goal is to use the Combobox_Change() event to fill the image control according to the value selected in the combobox.
    Many thanks for any kind help.
    Octavio
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,692

    Re: Show picture in cell according to combobox selection

    You did not answer my question in Post #3 so this has adapted code I had for a similar workbook.
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    06-12-2006
    Location
    Portugal
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    212

    Re: Show picture in cell according to combobox selection

    Hello Jolivanes,
    Thanks a million for your help. It works perfectly!
    Would buy You a beer if I could
    Octavio

  7. #7
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,692

    Re: Show picture in cell according to combobox selection

    No problem. Glad it is what you needed and thanks for letting us know.
    Good Luck.

+ 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. How to show InputBox based off ComboBox Selection
    By jdcortez in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-11-2018, 04:32 PM
  2. Excel VBA Screenshot Cell range to Userform picture based on combobox selection
    By andytesting in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 07-27-2017, 04:02 AM
  3. Combobox selection auto show result in textbox
    By justin1202 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-13-2015, 11:10 AM
  4. Replies: 0
    Last Post: 01-25-2013, 07:13 PM
  5. Macro code to show message depends on selection from Combobox/List
    By snn3 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-25-2012, 07:00 AM
  6. Show picture upon selection
    By ufopilot3 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-23-2012, 07:05 AM
  7. Insertion of picture by xls formula/ naming the picture with multiple selection crite
    By luckiest man in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-18-2011, 12:11 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