Closed Thread
Results 1 to 13 of 13

Macro to insert url images into cell ?

  1. #1
    Registered User
    Join Date
    06-15-2010
    Location
    Vancouver, Canada
    MS-Off Ver
    Excel 2003
    Posts
    5

    Macro to insert url images into cell ?

    Hi all, new here, and haven't found anything on this, so any help is appreciated !

    I'm trying to insert an image from a list of url address I've populated in one column into a neighbouring column.

    I'd like to loop this so it goes to the next cell down and does the same (i.e. look to the neighbouring cell on the left, insert image {i.e. click insert>picture>from file}, move down, look to neighbouring cell on left ..... )

    I've created the following (which works for one cell), but it copies the original url (which vary in length per item), and simply pastes it again in the original cell.

    Any help ?
    jkm

    ***EDIT***
    I guess I'm looking for how to have the macro pick new urls every time (you'll note in the code it has an actual url ... I need a new one for each new cell it will examine).
    ***********

    Please Login or Register  to view this content.
    Last edited by jkm500; 06-15-2010 at 01:34 PM.

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Macro to insert url images into cell ?

    The attached file...(which DOES contain VBA)...sequentially references the links in a selection and imports the associated image.

    Is that somethng you can work with?
    Attached Files Attached Files
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Macro to insert url images into cell ?

    Welcome to the forum, jkm.

    Please take a few minutes to read the forum rules, and then edit your post to add CODE tags.

    Thanks.
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Registered User
    Join Date
    06-15-2010
    Location
    Vancouver, Canada
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Macro to insert url images into cell ?

    Thank you both ... I honestly banged my head against a wall for several hours yesterday ... should have come here first !

    Many thanks ...

    SHG - hope the latest edits with code and "solved" are what you were after ... many thanks for the friendly pointer.

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    re: Macro to insert url images into cell ?

    They were indeed, thank you.

  6. #6
    Registered User
    Join Date
    07-17-2011
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: Macro to insert url images into cell ?

    Its 00.20 am here so I can not tell you how grateful I am for this as I have been trying for some hours to achieve this exact result

  7. #7
    Registered User
    Join Date
    07-27-2012
    Location
    Cincinnati,Ohio
    MS-Off Ver
    Excel 2010
    Posts
    1

    Re: Macro to insert url images into cell ?

    Quote Originally Posted by Ron Coderre View Post
    The attached file...(which DOES contain VBA)...sequentially references the links in a selection and imports the associated image.

    Is that somethng you can work with?
    You just saved me weeks of work!

  8. #8
    Registered User
    Join Date
    02-07-2013
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: Macro to insert url images into cell ?

    Quote Originally Posted by sffchew View Post
    You just saved me weeks of work!
    Wow...Thank you, thank you.

  9. #9
    Registered User
    Join Date
    04-19-2013
    Location
    GA
    MS-Off Ver
    Excel 2013
    Posts
    1

    Re: Macro to insert url images into cell ?

    This is a great tool.....thanks!

  10. #10
    Registered User
    Join Date
    08-08-2014
    Location
    The Netherlands
    MS-Off Ver
    Vista / office 2007
    Posts
    1

    Question Re: Macro to insert url images into cell ?

    It works when it is fetching the image from the web example, but not when I try it from my own folder.
    I have checked the validity of the link, but all I get is: Error loading C:/Users/Myname/Documents/blablabla... in the cell next to my selected hyperlink where I'd expect to see the image.

    I'm certain that it is not the macro, as it works as a dream with the webbased image. So there must be something preventing it in the folder. I've made sure that the folder is free to be editted.

    Anyone here knows what it might have caused it?

    Please forgive me if I fail to answer any possible solutions for the coming 2 weeks, as I'll be on vacation starting tomorrow.
    Thanks
    Last edited by Joyce-; 08-08-2014 at 04:19 PM. Reason: I forgot important information.

  11. #11
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Macro to insert url images into cell ?

    That's a fairly old file, written for Excel 2003.
    Try this later version:
    Convert_CellFilePaths_to_Cell_Pics_v2d.xlsm

    Is that something you can work with?

  12. #12
    Registered User
    Join Date
    02-15-2015
    Location
    Los Angeles, California
    MS-Off Ver
    mac 2011
    Posts
    1

    Re: Macro to insert url images into cell ?

    is there a newer version of this code for mac 2011? I cant get it to work

    I get this error

    Error loading http://www.contextures.com/images/am...AA_SL160_.jpeg
    Last edited by jamezcua; 02-15-2015 at 07:26 PM.

  13. #13
    Registered User
    Join Date
    05-21-2015
    Location
    Amsterdam
    MS-Off Ver
    xcel2011
    Posts
    1

    Re: Macro to insert url images into cell ?

    Same problem here. Not working for mac 2011. Getting 'Error loading'

Closed 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