+ Reply to Thread
Results 1 to 3 of 3

Select & Copy Specific Images to another workbook

  1. #1
    Registered User
    Join Date
    01-23-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    7

    Select & Copy Specific Images to another workbook

    Hi Guys,

    I have an interesting one that I just cant get around. I have a Master Sheet which contains a range of data that after filtering is copied to multiple external workbooks. Right now I am just copying the master sheet data and pasting 'values only' into the external worksheets. However going forward I wish to use little icons(images) next to various data cells. These are all on the Master sheet and I wish to copy them across (along with the other data) to the various external worksheets.

    A sample of the data/pictures in question are as so:

    example.png

    I have contemplated just a full copy and past of that column between workbooks however this wont work as the master sheet data is formula based (so when pasting into the external sheets it must be pasted as values/formatting only). So it looks like I need a vba sub that will:

    1. Identify the msoimages on the active sheet, preferably only those within a certain cell range?? (A5:B400) as there may be other images on the sheet from time to time. (I have tried a msoname filter but that requires every shape to have its own name as it will only select the first instance of repeat shape names, and there are to many for that.)

    2. Copy those images and paste them onto the external worksheet. The external worksheet layout will essentially be a replication of the master sheet so the images need to paste in the exact same positioning as they were in the Master Sheet (otherwise they wont match up with their cells.

    I do have a loop code that can select the images one at a time but this doesn't seem efficient, I tried to implement it as a SELECT CASE statement but I could not figure out the syntax or how to also filter not just on shape type but range reference as well. Nor could I figure out how to paste the shapes with some kind of location reference to ensure identical placement.

    Any suggestions on how I should be attacking this would be greatly appreciated

    Regards,

    Brent.
    Last edited by B_B; 01-23-2013 at 09:02 PM.

  2. #2
    Forum Contributor
    Join Date
    01-02-2007
    Location
    Australia NSW
    MS-Off Ver
    2013
    Posts
    494

    Re: Select & Copy Specific Images to another workbook

    I may be corrected, but i think you will have to NAME each image in order to move/copy individual ones...
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    01-23-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Select & Copy Specific Images to another workbook

    Thanks Corey,

    I'm not sure if that code is relevant for what Im looking at (it seems to only rename shapes?) Perhaps there is a simpler meathod. How about code that:

    1.Selects all msoobjects = pictures on the relevant sheet, excluding ones where picture.name = "x" "y" "z" etc..

    that should be fine for now.

+ 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