+ Reply to Thread
Results 1 to 7 of 7

Convert all frame contents in JPEG

  1. #1
    Registered User
    Join Date
    10-22-2015
    Location
    Brazil
    MS-Off Ver
    2010
    Posts
    4

    Convert all frame contents in JPEG

    Hey Guys, I need some help:

    I have a frame on userform, I load a picture in this frame, and some labels over this picture. Its working great, but I need to export the entire frame (with pictures and labels) as Image, like jpeg... Is there way to do that?

    PictureBox on vb6 may do this work, putting texts over the image and print them, but in excel there some way ?

    Thanks

  2. #2
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Convert all frame contents in JPEG

    Welcome to the forum

    One way:

    {CTRL] {Print Screen} will grab screen image
    Paste with {CTRL} V into Microsoft Paint or similar
    Crop the image
    Save image
    Click *Add Reputation to thank those who helped you. Ask if anything is not clear

  3. #3
    Registered User
    Join Date
    10-22-2015
    Location
    Brazil
    MS-Off Ver
    2010
    Posts
    4

    Re: Convert all frame contents in JPEG

    Hi, thanks!

    This way I already do, but I need to do this via VBA, because I need to insert this image in a worksheet to print.

    Thanks!

  4. #4
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Convert all frame contents in JPEG

    Give this a try... put the code below in a module, and then call CaptureAndPaste from your code to capture the form and paste it, change range as needed.

    Please Login or Register  to view this content.
    This basically executes an Alt-PrintScreen and then pastes into a range. (It will however, capture the whole form (active window actually), but I assume the form will be active).
    Last edited by Arkadi; 09-20-2017 at 03:46 PM.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  5. #5
    Registered User
    Join Date
    10-22-2015
    Location
    Brazil
    MS-Off Ver
    2010
    Posts
    4

    Re: Convert all frame contents in JPEG

    Hi, it worked great, its take a print screen from active form, but I need to take a print of only one frame inserted in this userform...

    Thanks!!!!

  6. #6
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Convert all frame contents in JPEG

    Ok... here is a more complex attempt...

    Wherever you need it in the userform code, paste this (adjust the Frame1 to the name of the frame):

    Please Login or Register  to view this content.
    And this in a module somewhere:

    Please Login or Register  to view this content.
    Others may have a more sophisticated approach, but this is the best I could do.
    Last edited by Arkadi; 09-21-2017 at 12:18 PM.

  7. #7
    Registered User
    Join Date
    10-22-2015
    Location
    Brazil
    MS-Off Ver
    2010
    Posts
    4

    Re: Convert all frame contents in JPEG

    Hi, thank you so much, it worked!

    If I understood, the sub make a ALT + PRTSCN on Userform, then paste to sheet, and crop the image on worksheet, is that?
    It will be possible instead pasting to a sheet, but exporting as JPEG?

    Thanks!

+ 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 - copy contents of word doc to outlook email inc jpeg
    By sipa in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-02-2016, 10:14 AM
  2. [SOLVED] Looping through controls by frame on userform (frame within a frame)
    By njs27 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-27-2015, 10:21 AM
  3. Macro or VBA to convert Excel sheet to JPEG, DICOM or TIFF formats
    By DORI in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-24-2014, 11:43 PM
  4. MACRO to convert graphs into JPEG
    By makinmomb in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-28-2014, 07:10 AM
  5. display contents of a worksheet in a form/frame
    By Gixxer_J_97 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-23-2012, 07:53 AM
  6. Convert Jpeg to Excel
    By Little Master in forum Excel General
    Replies: 7
    Last Post: 06-26-2010, 08:06 AM
  7. [SOLVED] How do I convert excel sheet w/jpeg embedded to adobe?
    By Tiffany P in forum Excel General
    Replies: 0
    Last Post: 06-23-2006, 03:20 PM

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