+ Reply to Thread
Results 1 to 9 of 9

How to vlookup picture with vba code

  1. #1
    Registered User
    Join Date
    03-16-2015
    Location
    Jakarta
    MS-Off Ver
    2007
    Posts
    4

    Question How to vlookup picture with vba code

    Dear Seniors,

    Im looking for vba code that can get a picture from another sheet without name define manager.

    Looking forward, need help..

  2. #2
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: How to vlookup picture with vba code

    Welcome to the forum!

    Please explain what "get a picture" means.

    You can use this to display a shape's name for say Sheet2.

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    03-16-2015
    Location
    Jakarta
    MS-Off Ver
    2007
    Posts
    4

    Re: How to vlookup picture with vba code

    tx for replay..

    i mean just like vlookup but the data that i want to get is the picture that i inserted, if theres 2 column ; first column is the data like name and the second one is their picture.
    can i lookup by the name to get their picture ?

    kindly need ur assistance..

  4. #4
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: How to vlookup picture with vba code

    I still am not sure what get means. Do you mean copy the shape to the right of the one you lookup with name to left?

    There are 2 approaches:
    1. Rename your shapes to be what you would lookup.
    2. The lookup cell would be a dropdown's named range list of the Column 1 values.

    In both approaches, the shape could be copied when dropdown value changes.

    Since you did not post an example file, here is an old one.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    03-16-2015
    Location
    Jakarta
    MS-Off Ver
    2007
    Posts
    4

    Lightbulb Re: How to vlookup picture with vba code

    thanks sir..

    but it shown another little problem, when the macro run, it goes blinking.
    the strange is, when the mouse is moving, the flicker is stop..
    can we remove the flicker when the macro ran..

    or can we move the pointer continuously by vba code (never heard that) ?

    need ur assistance..
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    03-14-2013
    Location
    MALAYSIA
    MS-Off Ver
    Excel 2016
    Posts
    16

    Re: How to vlookup picture with vba code

    Your sample here is very interesting. How do I go about adding new pictures or changing the pictures in your sample?

    Quote Originally Posted by Kenneth Hobson View Post
    I still am not sure what get means. Do you mean copy the shape to the right of the one you lookup with name to left?

    There are 2 approaches:
    1. Rename your shapes to be what you would lookup.
    2. The lookup cell would be a dropdown's named range list of the Column 1 values.

    In both approaches, the shape could be copied when dropdown value changes.

    Since you did not post an example file, here is an old one.

  7. #7
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: How to vlookup picture with vba code

    Addeimy, that is due to the picture moving? I had problems running your file. There were syntax errors. Maybe you left out some API commands. If this is a separate issue, you might start another thread.

    You may find this of use:
    Please Login or Register  to view this content.
    Normally, I use my Speed routines to disable some things.
    Please Login or Register  to view this content.

  8. #8
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: How to vlookup picture with vba code

    Aghlab, to show all pictures on sheet1, in the immediate window of the VBE, paste this code and press enter key at end to execute or play it in a sub.
    Please Login or Register  to view this content.
    Once you change the pictures or add more, run the code again but set it to False.

    Don't forget to update Sheet2 with names and the picture/shape names to the right. Lastly, be sure that the named range, PicTable, includes all that you added in sheet2.

  9. #9
    Registered User
    Join Date
    03-16-2015
    Location
    Jakarta
    MS-Off Ver
    2007
    Posts
    4

    Re: How to vlookup picture with vba code

    Ure the Man !!
    Big thanks Sir..

+ 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. VB code to insert picture when email picture not in excel
    By T_BOLT in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-07-2014, 06:42 AM
  2. [SOLVED] Assigning the picture to the code =vlookup
    By Szwadron in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-08-2014, 02:43 PM
  3. Click on picture and run macro to replace existing picture with selected picture file
    By houseflipsheet in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-14-2014, 12:02 AM
  4. Replies: 0
    Last Post: 01-09-2014, 11:27 PM
  5. [SOLVED] vlookup and picture
    By youth in forum Excel General
    Replies: 2
    Last Post: 10-16-2005, 02:05 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