+ Reply to Thread
Results 1 to 3 of 3

Insert Multiple pictures using VB

  1. #1
    Registered User
    Join Date
    07-04-2011
    Location
    Chester, UK
    MS-Off Ver
    Excel 2007 Professional Plus
    Posts
    7

    Insert Multiple pictures using VB

    Hi,
    Sorry for posting this but I've ploughed through multiple answers to similar questions and just CAN'T get it to work for me! I have a very limited knowledge of VB so must not be editing the code correctly.
    Anyhow...
    I have a list of product codes in Column B (from B2). (M1005, M1006, M1007 etc)
    I have some pictures in folder "C:\Office Docs\Availability Pictures" which have corresponding filenames to the numbers in column B (M1005.jpg, M1006.jpg, M1007.jpg etc)

    I would like to create a Macro which looks at the product code in cell B2, adds ".jpg" to the end, looks for the file in the specified folder, then adds the corresponding picture into cell A2, resizes to fit, then moves on to look at cell B3......and on and on until it gets to a blank cell in column B.
    I got to the stage where it would add the first photo but then I tried to alter the code and messed the whole thing up

    Can anyone help please?

  2. #2
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Insert Multiple pictures using VB

    Please Login or Register  to view this content.



  3. #3
    Registered User
    Join Date
    07-04-2011
    Location
    Chester, UK
    MS-Off Ver
    Excel 2007 Professional Plus
    Posts
    7

    Re: Insert Multiple pictures using VB

    Thanks snb...though I get a Compile Error - "Sub or Function not defined" when I run the macro...
    Sorry, I know I should just learn how to use VBA better...

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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