Closed Thread
Results 1 to 4 of 4

Inserting pictures in excel through vba

  1. #1
    Registered User
    Join Date
    08-21-2014
    Location
    Montreal, Canada
    MS-Off Ver
    2007
    Posts
    6

    Question Inserting pictures in excel through vba

    I have an Excel price list of dozens of items and I am trying to insert a small picture of each product in Column A next to the item number (column B).

    I am looking for a code that would look at my Item number (column B), get the picture from a specified folder, insert it in Column A adjacent to the item number and automatically repeat the code for all of the items ... The Cell Height could be around 50.

    Now since some of the items are grouped in some pictures (eg. table and chairs), I may have the same picture for different items ... is this a problem ?

    I am fairly New in VBA so any help would be much appreciated.

    Thanks

  2. #2
    Registered User
    Join Date
    08-21-2014
    Location
    Montreal, Canada
    MS-Off Ver
    2007
    Posts
    6

    Re: Inserting pictures in excel through vba

    I finally found a code to do this:

    Please Login or Register  to view this content.

    However, if a picture is not in my picture folder, the VBA code stops (Debug).

    Is there a way to modify the code so that it runs to the end of the range regardless if a few pictures in the folder are missing ?
    Last edited by arlu1201; 08-27-2014 at 12:23 AM. Reason: Use code tags as per forum rule 3.

  3. #3
    Valued Forum Contributor
    Join Date
    05-21-2009
    Location
    Great Britain
    MS-Off Ver
    Excel 2003
    Posts
    550

    Re: Inserting pictures in excel through vba

    Use the Dir function to see if the file exists.
    Post responsibly. Search for excelforum.com

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Inserting pictures in excel through vba

    Thread posted in commercial services, hence closed.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Inserting Pictures in Excel, need auto adjustment on size
    By Brooky in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-05-2006, 09:15 AM
  2. [SOLVED] Dictate physical size of pictures inserting into Excel?
    By D Harman in forum Excel General
    Replies: 0
    Last Post: 06-15-2006, 10:55 AM
  3. Repost: Speed of inserting pictures and Excel memory
    By Greg Wilson in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 09-16-2005, 05:05 AM
  4. [SOLVED] Excel memory and speed when inserting pictures ???
    By Greg Wilson in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-14-2005, 04:05 AM
  5. Problems inserting pictures in Excel 2002 sp-2
    By L.Skaggs in forum Excel General
    Replies: 11
    Last Post: 08-17-2005, 09:05 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