+ Reply to Thread
Results 1 to 5 of 5

Auto change Picture Based on cell value. Please

  1. #1
    Forum Contributor
    Join Date
    09-18-2014
    Location
    Pakistan
    MS-Off Ver
    2013, 2016
    Posts
    283

    Auto change Picture Based on cell value. Please

    Hi Experts of Excel Forum.
    May God bless you all. Please give sometime to this thread.

    I am a teacher in a college. And there are many students in my class.
    I have to print files of student with their pictures.
    And this is too difficult to import every picture and then delete the picture and then import new one.

    So I make a example sheet to show you what I really want.
    I have Pictures in "C:\Amir\"
    And I want when I enter roll number of student and then press the button. It should change the picture.

    I shall be very thankful to you.

    Regards
    Amir
    Attached Files Attached Files

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Auto change Picture Based on cell value. Please

    You may try this.....

    Please Login or Register  to view this content.
    This code will work if the picture of the students are saved with their names. So as per the sample file if the file C:\Amir\Amir Shahzad.jpg is found, the code will work and insert the picture of Amir Shahzad in D4 else it won't insert a picture.
    Attached Files Attached Files
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  3. #3
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: Auto change Picture Based on cell value. Please

    Working with pictures in VB isn't my forte, but try this.

    It assumes that the pictures are named the same as the Roll No you're typing into B4. You'll also need to change the "Sheet1"s to whatever the name of the sheet is that you want the pictures on.

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    09-18-2014
    Location
    Pakistan
    MS-Off Ver
    2013, 2016
    Posts
    283

    Re: Auto change Picture Based on cell value. Please

    Hi Neeruj and walruseggman
    Thanks a lot to both of you.

    You did great job. I am very happy with your great answer

  5. #5
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Auto change Picture Based on cell value. Please

    You're welcome. Glad I could help.

+ 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. Want picture to change based on value selected in drop down menu
    By omartin in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-13-2013, 05:38 PM
  2. Excel 2007 : Change picture based on the value of the cell
    By junkymaniac in forum Excel General
    Replies: 0
    Last Post: 05-27-2011, 02:30 AM
  3. Using VBA to change a picture according to a Cell Ref
    By Jamesr571 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-16-2011, 05:32 AM
  4. Change picture in image control based on cell values.
    By Rberg365 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-29-2010, 05:26 PM
  5. Auto Userform Picture Change
    By Shake in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-05-2005, 10:57 PM

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