+ Reply to Thread
Results 1 to 32 of 32

VBA code to lookup a Image

  1. #1
    Forum Expert
    Join Date
    03-28-2014
    Location
    Hyderabad,India
    MS-Off Ver
    Excel 2013
    Posts
    1,887

    VBA code to lookup a Image

    HI ,

    I here by attaching file i need a macros to fetch the image in Sheet "Shape" Column "C" , based on "Shape Code" in column "B" , i need the output in Sheet name "Calculation" Column "T" by considering the lookup value in Column "J".

    Early i have done this using name manager but i the draw back is i have to create many reference .
    Note :
    If this can be one by formula it also helps me

    Find the attached sheet

    With Regards,
    P V Ravi Kumar
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    03-28-2014
    Location
    Hyderabad,India
    MS-Off Ver
    Excel 2013
    Posts
    1,887

    Re: VBA code to lookup a Image

    Hello


    to keep this active

  3. #3
    Forum Expert
    Join Date
    03-28-2014
    Location
    Hyderabad,India
    MS-Off Ver
    Excel 2013
    Posts
    1,887

    Re: VBA code to lookup a Image

    hello

    any help

  4. #4
    Forum Expert
    Join Date
    03-28-2014
    Location
    Hyderabad,India
    MS-Off Ver
    Excel 2013
    Posts
    1,887

    Re: VBA code to lookup a Image

    Hi

    all need help .. lookup for image in excel either by Code or formula

    Punnam
    Last edited by Punnam; 04-30-2019 at 03:16 AM.

  5. #5
    Forum Expert
    Join Date
    03-28-2014
    Location
    Hyderabad,India
    MS-Off Ver
    Excel 2013
    Posts
    1,887

    Re: VBA code to lookup a Image

    HI,

    Help

    Punnam

  6. #6
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,230

    Re: VBA code to lookup a Image

    Please Login or Register  to view this content.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  7. #7
    Forum Expert
    Join Date
    03-28-2014
    Location
    Hyderabad,India
    MS-Off Ver
    Excel 2013
    Posts
    1,887

    Re: VBA code to lookup a Image

    Hi
    Sintek how use this code i have created module and saved this but nothing happening .

    Error Message : "Cant Execute code in break mode"

    Punnam

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: VBA code to lookup a Image

    Administrative Note:

    Regarding the frequent bumping of this thread, we don't expect you to bump threads more than once in every 24 hours. Please remember that those who help here do so voluntarily and of their own goodwill. They live in many different time zones and many will be out at work right now if they are not asleep on the other side of the globe. This is not a paid 'service': members will help when they are ready and able to do so, and not 'on demand'. Please do not try to put pressure of time on anyone here: if you get the help you need today, that's fine, but you really should not count on it. Thanks for your understanding and patience.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  9. #9
    Forum Expert
    Join Date
    03-28-2014
    Location
    Hyderabad,India
    MS-Off Ver
    Excel 2013
    Posts
    1,887

    Re: VBA code to lookup a Image

    Hi sintek,

    It works good but need some more correction
    1) i have to first Enter all the Shape code and then i have to execute the Macros , This part is good
    2) But if code is executed more than once i am getting duplicate images
    3) Can i get the code executed dynamically only for individual rows for those which shape is entered .

    Punnam

  10. #10
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,230

    Re: VBA code to lookup a Image

    Code gets placed in std module and run from command button...see attached...
    Attached Files Attached Files

  11. #11
    Forum Expert
    Join Date
    03-28-2014
    Location
    Hyderabad,India
    MS-Off Ver
    Excel 2013
    Posts
    1,887

    Re: VBA code to lookup a Image

    Aligw.

    Sorry for the bumping i will take care and stop sending reminder .

    Punnam

  12. #12
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,230

    Re: VBA code to lookup a Image

    If you want the picture inserted as you type the code in each cell then put this in Sheets("Calculation") Module
    Please Login or Register  to view this content.

  13. #13
    Forum Expert
    Join Date
    03-28-2014
    Location
    Hyderabad,India
    MS-Off Ver
    Excel 2013
    Posts
    1,887

    Re: VBA code to lookup a Image

    Sintek,

    I first really appreciate your patience to help , the second code works like magic , i am having few more amendments hope you could help me
    1) if I re enter the shape code, the current shape is over lapped on my previous one, instead of that let the previous shape get deleted
    2) The sheet "Calculation" is proto type i may need more than 20 sheets based on the requirement : so do i need to copy the code to all the sheet ? or do we have any alternative
    3) A small delete macros to clean a particular sheet before i use it again .

    With Regards,
    Punnam

  14. #14
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,230

    Re: VBA code to lookup a Image

    CommandButton on sheet to clear shapes...Solves #3
    Please Login or Register  to view this content.
    This code in ThisWorkbook.Module...Solves #1 & #2

    Please Login or Register  to view this content.
    Attached Files Attached Files

  15. #15
    Forum Expert
    Join Date
    03-28-2014
    Location
    Hyderabad,India
    MS-Off Ver
    Excel 2013
    Posts
    1,887

    Re: VBA code to lookup a Image

    hi,

    One more issue when i am trying to insert a row, all the macros are stopped and asking for debug .

    With Regards,
    Punnam

  16. #16
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,230

    Re: VBA code to lookup a Image

    Try this...
    Please Login or Register  to view this content.
    just after
    Please Login or Register  to view this content.

  17. #17
    Forum Expert
    Join Date
    03-28-2014
    Location
    Hyderabad,India
    MS-Off Ver
    Excel 2013
    Posts
    1,887

    Re: VBA code to lookup a Image

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    So this code will not work am i correct

    Punnam

  18. #18
    Forum Expert
    Join Date
    03-28-2014
    Location
    Hyderabad,India
    MS-Off Ver
    Excel 2013
    Posts
    1,887

    Re: VBA code to lookup a Image

    I have deleted the shape code accidentally and since then the macros stopped working attached the PPT error message

    Punnam
    Attached Files Attached Files

  19. #19
    Forum Expert
    Join Date
    03-28-2014
    Location
    Hyderabad,India
    MS-Off Ver
    Excel 2013
    Posts
    1,887

    Re: VBA code to lookup a Image

    When Copied to another work book

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Punnam

  20. #20
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,230

    Re: VBA code to lookup a Image

    Virus in your powerpoint file...

    I have no idea what you are referring to now...Post 14 & 16 solved all your points...

  21. #21
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: VBA code to lookup a Image

    @Punnam: What do you expect someone here to do,
    stopped and asking for debug
    You want US to guess what the error message is?
    Press Yes to debug and see what's the error,
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  22. #22
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,230

    Re: VBA code to lookup a Image

    I have deleted the shape code accidentally and since then the macros stopped working attached the PPT error message
    So...put the code back...

  23. #23
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: VBA code to lookup a Image

    @sintek: aren't you asking too much

  24. #24
    Forum Expert
    Join Date
    03-28-2014
    Location
    Hyderabad,India
    MS-Off Ver
    Excel 2013
    Posts
    1,887

    Re: VBA code to lookup a Image

    keebellash,

    My knowledge to Macros or VBA is Minute , what i can do is copy and run check this is am capable of .

    sintek

    I have transferred the code to another work book with same sheet name and information unfortunately the code was not working and showing Run time error "1004" ..
    i will Share the Image
    Punnam
    Attached Images Attached Images
    Last edited by Punnam; 05-02-2019 at 03:43 AM.

  25. #25
    Forum Expert
    Join Date
    03-28-2014
    Location
    Hyderabad,India
    MS-Off Ver
    Excel 2013
    Posts
    1,887

    Re: VBA code to lookup a Image

    After replacing the code i have to close it and reopen it again to activating the macros

  26. #26
    Forum Expert
    Join Date
    03-28-2014
    Location
    Hyderabad,India
    MS-Off Ver
    Excel 2013
    Posts
    1,887

    Re: VBA code to lookup a Image

    sintek

    I think i am asking too much thanks for help i will work on the sheet you have made for me it will solve all problem .

    With Regards,
    Punnam

  27. #27
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,230

    Re: VBA code to lookup a Image

    @ Keebellah
    I remember when I had no Excel knowledge...

    i will Share the Image
    Rather share the file...

  28. #28
    Forum Expert
    Join Date
    03-28-2014
    Location
    Hyderabad,India
    MS-Off Ver
    Excel 2013
    Posts
    1,887

    Re: VBA code to lookup a Image

    Hi

    Find the file
    Attached Files Attached Files

  29. #29
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: VBA code to lookup a Image

    Same here, but ...

  30. #30
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,230

    Re: VBA code to lookup a Image

    I see you added drop downs...So not the same as previous workbook

    Also...INCREASE your Row heights so that the pics fit in otherwise code can't find pic to delete as it does not fit in the cell
    Please Login or Register  to view this content.
    Last edited by sintek; 05-02-2019 at 04:43 AM.

  31. #31
    Forum Expert
    Join Date
    03-28-2014
    Location
    Hyderabad,India
    MS-Off Ver
    Excel 2013
    Posts
    1,887

    Re: VBA code to lookup a Image

    Sintek,

    Thanks for helping me in preparing this sheet you work is amazing

    With Regards,
    Punnam

  32. #32
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,230

    Re: VBA code to lookup a Image

    .........................................
    Thanks.gif

+ 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. Image Lookup from Folder
    By Raj.xls in forum Excel General
    Replies: 23
    Last Post: 02-19-2019, 08:47 AM
  2. Lookup for image/comment
    By exceleratevba in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-26-2018, 03:21 PM
  3. Search box code - Will display an image and clear to remove image
    By mutzie in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-06-2016, 11:10 AM
  4. How to lookup image in excel
    By salmantariqhr in forum Excel General
    Replies: 2
    Last Post: 06-18-2015, 11:41 PM
  5. Lookup function that produces a image
    By Brian Tam in forum Excel General
    Replies: 7
    Last Post: 04-21-2011, 08:54 PM
  6. insert image - lookup in different worksheet
    By fredpox in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-09-2010, 05:28 PM
  7. Image Lookup Help
    By superman_86 in forum Excel General
    Replies: 3
    Last Post: 07-27-2009, 11:08 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