Results 1 to 5 of 5

Copying images from one worksheet to another (+ repositioning)

Threaded View

nymm Copying images from one... 02-15-2012, 06:04 PM
nymm Re: Copying images from one... 02-17-2012, 04:34 AM
nymm Re: Copying images from one... 02-17-2012, 09:54 AM
Andy Pope Re: Copying images from one... 02-17-2012, 10:21 AM
nymm Re: Copying images from one... 02-17-2012, 11:38 AM
  1. #1
    Registered User
    Join Date
    04-29-2011
    Location
    Europe
    MS-Off Ver
    Excel 2007
    Posts
    22

    Copying images from one worksheet to another (+ repositioning)

    Hello,

    I'm working on a subroutine which generates and prints a report. Basically, I create a new worksheet, populate it with the relevant data, add some layout, send it to the printer, and finally remove the sheet again.

    One of the layout features is the addition of various little icons, the number, type and location of which depend on the actual data. Because I prefer not to rely on external image files, I've included the icons as pictures on a hidden worksheet in the workbook. The idea is to copy the appropriate pictures while generating the report and put them in the correct spot on the sheet. It's this repositioning that is causing me problems.

    The code I use is this:

    Dim sheetReport as Worksheet
    Dim rangeReference as Range
    
    ThisWorkbook.Sheets(“Images”).Shapes("IconGrowth").Copy
    sheetReport.Range(rangeReference.Offset(i,j)).PasteSpecial
    This pastes the selected icon in the top left corner of the designated cell, which is not always exactly where I want it. What is the easiest way to, for example, move the pasted picture a few points to the left and down, so that it is in the center of the cell?

    Thank you in advance for your advice!

    nymm
    Last edited by nymm; 02-17-2012 at 09:55 AM.

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