+ Reply to Thread
Results 1 to 2 of 2

Insert Image using Dropdown with Multiple Category Selections

  1. #1
    Registered User
    Join Date
    09-13-2018
    Location
    Detroit, USA
    MS-Off Ver
    Office 2016
    Posts
    1

    Insert Image using Dropdown with Multiple Category Selections

    I am trying to pull in an image when a specific word is selected from a drop down. I have been able to successfully use the code below to pull in images from a folder for one dropdown. However, I have multiple dropdown lists(Located at B7, E7, H7, K7, N7, B12, E12, & H12) that need to be able to pull in an image in the cell below. How can I modify the code to pull in different images across multiple dropdowns?


    Private Sub Worksheet_Change(ByVal Target As Range)

    Dim myPict As Picture
    Dim PictureLoc As String

    If Target.Address = Range("B7").Address Then

    ActiveSheet.Pictures.Delete

    PictureLoc = "C:\Users\sl\Desktop\IMAGES\" & Range("B7").Value & ".png"

    With Range("B9")
    Set myPict = ActiveSheet.Pictures.Insert(PictureLoc)
    .RowHeight = myPict.Height
    myPict.Top = .Top
    myPict.Left = .Left
    myPict.Placement = xlMoveAndSize
    End With

    End If

    End Sub

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,480

    Re: Insert Image using Dropdown with Multiple Category Selections

    Assume image is placed two rows below changed cell

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

+ 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. Data Validation Multiple Selection - Keep Dropdown Box Open to Make Selections
    By PSSMargaret in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-31-2016, 12:32 PM
  2. Dropdown menu with dropdowns inside it which supports multiple selections
    By hermesalpha in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-15-2015, 01:03 PM
  3. Lookup based on multiple dropdown selections
    By cedrikfd in forum Excel General
    Replies: 3
    Last Post: 10-02-2014, 05:16 PM
  4. [SOLVED] Multiple graph selections using a dropdown list
    By John3828 in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 09-24-2014, 02:49 PM
  5. Send Multipage Userform CheckBox Selections to Multiple Rows of Category
    By excelforumkeys in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-18-2014, 10:28 AM
  6. Replies: 0
    Last Post: 03-26-2013, 09:41 AM
  7. How can I allow users to make multiple selections from a dropdown.
    By Liz in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-20-2005, 05:15 PM

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