Results 1 to 7 of 7

Thread: Drop down menu with pictures placed into another cell

  1. #1

    Drop down menu with pictures placed into another cell



    Register for a FREE account, and/
    or Log in to avoid these ads!

    I have an excel form with drop down menu with peoples names and I want to click on a name and have it add their jpeg signature in a cell above. I have tried to research some code on here but cannot figure out how to make it work.

    Does anyone have any ideas how to make this work?

    I have attached a copy of the excel file.

    Thanks in advance for any help!

    COR-01.zip

  2. #2
    Acolyte misi01's Avatar
    Join Date
    Jul 2011
    Location
    Stockholm,Sweden
    Posts
    31
    Articles
    0
    Don't get your hopes up, but .... Can you lead me through what I'm supposed to do here. On sheet 1, you have columns A & B with names and picture references (1-3). However, the "corresponding" pictures are called Picture 2, 3 & 4.

    Assuming that's okay, what am I (as the user) supposed to do ?

  3. #3
    misi01,

    Sorry about my explanation, I am clearly pretty clueless about how to achieve this. I really don't care about how it is formatted. My attempt as shown on the attachment didn't work.

    Basically, I am just trying to find a way to insert signatures (JPEG images) above the typed names that are pulled from the drop down menus on the first two pages. So when I select a name from the drop down menu it will automatically insert the correct signature JPEG in the cell above.

    I don't know if this is possible or not but would really be helpful.

    Thanks

  4. #4
    Super Moderator JoePublic's Avatar
    Join Date
    Sep 2011
    Location
    Askew
    Posts
    175
    Articles
    0
    Excel Version
    2010
    Howdy,
    See if this version of your file works for you.
    Attached Files Attached Files
    Circumference of a circle = 2πrē



    ēthe circle's radius

  5. #5
    Acolyte misi01's Avatar
    Join Date
    Jul 2011
    Location
    Stockholm,Sweden
    Posts
    31
    Articles
    0
    Joe - your zipped file seems to be password protected. (Have been struggling with this - it's quiet at work - in a self-education process, it'll be interesting to see your solution)

  6. #6
    Super Moderator JoePublic's Avatar
    Join Date
    Sep 2011
    Location
    Askew
    Posts
    175
    Articles
    0
    Excel Version
    2010
    It shouldn't be - I certainly didn't add one to it, not does it ask me for one when I download it again.

    The basic code is in the Pending sheet:
    Code:
    Private Sub Worksheet_Change(ByVal Target As Range)   Dim pic As Picture
       Dim varPic
       If Not Intersect(Range("B38"), Target) Is Nothing Then
       
          On Error Resume Next
          Me.Pictures("SigPic").Delete
          On Error GoTo 0
          
          If Len(Range("B38").Value) > 0 Then
             varPic = Application.VLookup(Range("B38").Value, Sheet3.Range("Pictable"), 2, False)
             If IsError(varPic) Then
                MsgBox "Name does not match a signature name"
             Else
                Sheet3.Pictures(varPic).Copy
                Me.Range("B35").PasteSpecial xlPasteAll
                Me.Pictures(Me.Pictures.Count).Name = "SigPic"
             End If
          End If
       End If
    End Sub
    then just need to correct the picture names and employee names in the table and redefine the pictRange.
    Circumference of a circle = 2πrē



    ēthe circle's radius

  7. #7

    "solved"

    JoePublic,

    This worked perfectly!

    Thank you so much for your help! You have saved me on this one!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •