+ Reply to Thread
Results 1 to 12 of 12

Macro to copy/paste range as an image...

  1. #1
    Registered User
    Join Date
    08-11-2011
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2007/ 2010
    Posts
    72

    Macro to copy/paste range as an image...

    I have successfully created a macro that, when clicked, copies a certain range of cells A1:A7 (example).

    Here's the code...
    Please Login or Register  to view this content.
    But, what I can't seem to accomplish is the ability to select multiple ranges, from multiple sheets. Is there a way to accomplish this?

    When I run the following code...

    Please Login or Register  to view this content.
    1. With both sheets, and both ranges, I get an error that says, Subscript out of range

    2. With one sheet, but both ranges, I get an error that says, That command can only be used on multiple selections

    Is there something I can do to accomplish the goal I'm trying to get to?

    -Jared

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Macro to copy/paste range as an image...

    Hello jpcsolutions,

    Is the statement below referring to Sheet1.Range("A1:C7") and Sheet2."A1:A7")?
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    08-11-2011
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2007/ 2010
    Posts
    72

    Re: Macro to copy/paste range as an image...

    Hi Leith,

    Yes. That's correct. I'm trying to pull data from multiple sheets, and ranges and copy that information as an image. Then, I'll paste it where I see fit.

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Macro to copy/paste range as an image...

    Hello jpcsolutions,

    Do you want the final paste to be a contiguous range of these disparate ranges?

  5. #5
    Registered User
    Join Date
    08-11-2011
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2007/ 2010
    Posts
    72

    Re: Macro to copy/paste range as an image...

    Yes. That's where I'm trying to get to. But I can only seem to copy continuous ranges from one sheet. Can you help?

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Macro to copy/paste range as an image...

    Hello jpcsolutions,

    If you post your workbook then I can more easily.

  7. #7
    Registered User
    Join Date
    08-11-2011
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2007/ 2010
    Posts
    72

    Re: Macro to copy/paste range as an image...

    The workbook is attached.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    08-11-2011
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2007/ 2010
    Posts
    72

    Re: Macro to copy/paste range as an image...

    If you uncomment the commented out portion of the VB, it will auto-paste in the same workbook.

  9. #9
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Macro to copy/paste range as an image...

    Hello jpcsolutions,

    I will write macro to combine the two ranges you mention in your first post and post the results at B6.

  10. #10
    Registered User
    Join Date
    08-11-2011
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2007/ 2010
    Posts
    72

    Re: Macro to copy/paste range as an image...

    And how might I pull data from multiple sheets?

  11. #11
    Registered User
    Join Date
    08-11-2011
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2007/ 2010
    Posts
    72

    Re: Macro to copy/paste range as an image...

    I'm still not able to come up with anything. Any ideas?

  12. #12
    Registered User
    Join Date
    08-11-2011
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2007/ 2010
    Posts
    72

    Re: Macro to copy/paste range as an image...

    Are you still there?

+ 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. copy range and image & paste into outlook
    By sankar kasilingam in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-31-2013, 05:48 AM
  2. [SOLVED] Macro Help. Copy Hyperlink url from Column A and paste its image into Column B
    By kdela1212 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-04-2013, 09:00 AM
  3. Change range of cells within VBA macro and copy and paste to fixed cell range
    By Mannyny in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-20-2012, 11:51 AM
  4. Copy data range from excel to word as an image (i.e. paste special)
    By papasideris in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-21-2012, 09:54 AM
  5. Copy cells then paste as an image
    By jaywizz in forum Excel General
    Replies: 3
    Last Post: 09-15-2009, 08:45 AM

Tags for this Thread

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