+ Reply to Thread
Results 1 to 3 of 3

Need to take screenshot of 2 sheets and make 1 jpeg out of both

Hybrid View

  1. #1
    Registered User
    Join Date
    04-30-2021
    Location
    Canada
    MS-Off Ver
    365
    Posts
    12

    Need to take screenshot of 2 sheets and make 1 jpeg out of both

    Hello all,

    I have made an excel file with 2 separate sheets in it. I need make a button which takes a screenshot on sheet one with the range A1 to K31 and on the second sheet from B2 to I43 and combines them into a single JPEG image saved on my desktop (Preferably with sheet1 image on the left).

    I have no idea how to do something like this and any help would be greatly appreaciated.

    Thanks,

    ABourdages

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,973

    Re: Need to take screenshot of 2 sheets and make 1 jpeg out of both

    Use camera tool.
    File -> Options -> Quick Access Tool Bar. Choose commands from "All commands". Add "Camera".
    Add new blank sheet.

    Select range you want to make into image. Click on camera tool.
    In blank sheet. Click where you want image to show.
    Do the same for 2nd range.

    Now you can adjust position of the image. Camera tool image will update if you update source data.
    So once this is set up. No need to redo above steps.

    Now just use screen capture or any other tool to take image capture of the range.

    If this isn't what you want, it would be helpful if you upload how resulting image should look like.
    "Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something."
    ― Robert A. Heinlein

  3. #3
    Registered User
    Join Date
    03-12-2022
    Location
    Argentina
    MS-Off Ver
    2016
    Posts
    38

    Re: Need to take screenshot of 2 sheets and make 1 jpeg out of both

    Hi,
    This Macro copy both ranges from Sheet1 and Sheet2 to a third Sheet (Image)
    then save the grouped shape as jpg.

    Sub Macro2()
    Application.CutCopyMode = False
    Application.ScreenUpdating = True '---- keep this
    
        Sheets("Hoja1").Range("A1:K31").Copy
        Sheets("Image").Select
        Range("A1").Select
        MsgBox "Pasting Image 1"  '---- Do not remove
        Sheets("Image").Pictures.Paste.Select
        pic1 = Selection.Name
        Sheets("Hoja2").Range("B2:I43").Copy
        Sheets("Image").Select
        Range("L1").Select
        MsgBox "Pasting Image 2" '---- Do not remove
        Sheets("Image").Pictures.Paste.Select
        pic2 = Selection.Name
        Sheets("Image").Shapes.Range(Array(pic1)).Select
        Sheets("Image").Shapes.Range(Array(pic2, pic1)).Select
        Selection.ShapeRange.Group.Select
        SaveShapeAsPicture "myimage.jpg"
    End Sub
    Attached Files Attached Files
    Last edited by Danny44; 04-10-2024 at 07:55 PM.

+ 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 make JPEG/JPG file at desire size
    By sanjuss2 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-23-2023, 03:56 AM
  2. Replies: 6
    Last Post: 03-16-2020, 11:10 AM
  3. Excel vba code required to insert jpeg images into sheets and delete unused.
    By mchilapur in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-29-2015, 08:01 AM
  4. Make a screenshot of large range of data
    By ABSTRAKTUS in forum Excel General
    Replies: 2
    Last Post: 05-26-2010, 10:51 AM
  5. How do I make a chart I have generated in Excel into a jpeg file.
    By Patty T in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 08-20-2006, 03:45 PM
  6. Replies: 1
    Last Post: 12-08-2005, 04:10 PM
  7. [SOLVED] I can not print jpeg pics. inserted in my excell sheets.
    By Chopper in forum Excel General
    Replies: 0
    Last Post: 08-29-2005, 11:05 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