Closed Thread
Results 1 to 3 of 3

Delete picture in VBA

  1. #1
    Registered User
    Join Date
    08-02-2012
    Location
    MPLS
    MS-Off Ver
    Excel 2010
    Posts
    7

    Delete picture in VBA

    I have a beautiful workbook that I created with help from this forum, and it would be perfect if I could figure out one last problem. Basically, I want to edit my current macro to delete a picture, and then fill in a new one.

    Currently, cell C3 is a manual value cell, where the user enters a product SKU and a bunch of data fills the page. Cell D2 is a VLOOKUP of C3 to another worksheet which contains the relevant product image URL. I have a macro written which navigates to that URL, and populates A2 with the products image. Enter SKU in C3 - get product image in A2. It's pretty slick, but has one problem. Every time the new sku is entered, the new product image is just stacked onto the old ones. If you enter 100 skus, you have 100 images on top of each other. Is there a way to edit the following Macro so that when a new sku is entered, the old image is first deleted, and then a new one is filled in? Current Macro:

    Please Login or Register  to view this content.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Delete picture in VBA

    Duplicate post
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

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

    Re: Delete picture in VBA

    Welcome to the Forum, unfortunately:

    This is a duplicate post and as such does not comply with Rule 5 of our forum rules. This thread will now be closed, you may continue in your other thread.

    Thread 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)

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