+ Reply to Thread
Results 1 to 2 of 2

Macro for inserting an image from a sheet/book into another sheet

  1. #1
    Registered User
    Join Date
    06-15-2022
    Location
    Praha
    MS-Off Ver
    2013
    Posts
    1

    Macro for inserting an image from a sheet/book into another sheet

    Hi!

    Please, can you help me to correct the macro, I don't really understand it.
    The whole point is to transfer a photo from another book/sheet to the activesheet. I have a Sheet 1 in which there is a catalog with photos, and on Sheet 2 I need to transfer these photos according to the article. But something is clearly not done right

    Thank you very much!

    HTML Code: 
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Macro for inserting an image from a sheet/book into another sheet

    From reading the code - you have a line
    Please Login or Register  to view this content.
    But iLastrow, while initialised, is never set to the number of rows so has a value of 0. The code never enters the 'For' loop.

    Comment after reading code only, not tested so there may be other issues - in particular you cannot copy an image simply by copying the cell/range. Images 'float' over the worksheet and are not 'contained' in a cell. However, they do have a 'TopLeftCell' property so you'll probably need to find the image with a matching Top left cell address.
    Last edited by cytop; 06-15-2022 at 07:23 AM.

+ 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. Macro to build new sheet in workbook based upon contents of a different sheet in same book
    By IrishMist1748 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-09-2014, 06:44 PM
  2. Replies: 2
    Last Post: 01-18-2014, 10:54 PM
  3. Macro to copy sheet from closed work book and overwrite if sheet already exists
    By munkee in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 11-23-2009, 06:36 PM
  4. Inserting image in Excel sheet based on EMP ID
    By viswanadh in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-10-2008, 12:03 PM
  5. Replies: 3
    Last Post: 08-23-2008, 06:01 PM
  6. Inserting an Image in an Excel sheet using VBScript.
    By Vishal in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-28-2005, 11:05 AM
  7. Inserting an image in an excel sheet using QTP !
    By Vishal in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-28-2005, 02:05 AM

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