+ Reply to Thread
Results 1 to 2 of 2

VBA to save range as an image with specific file name?

  1. #1
    Forum Contributor
    Join Date
    05-12-2014
    MS-Off Ver
    Excel 2013
    Posts
    131

    VBA to save range as an image with specific file name?

    Hey there! This forum has become my home away from home when it comes to solving my Excel issues, so just a pre-emptive thank you for all the awesome suggestions and feedback everyone offers!

    I'm in a pickle and could use some help. Currently we use a spreadsheet at work to assign people to their job tasks for the day. Once that spreadsheet is filled out, we select the relevant range, copy it into a photo editing program, then save it as a jpeg. This seems like an unnecessary step, so I wanted to see if I could make an ActiveX button that'd allow us to click it and have the image saved straight from Excel. Here's the code I have thus far:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    And this works!... sort of. It creates a chart of the image, but it's small-ish and has a ton of negative space. I'm not sure if I'm able to set the size or have it auto-fit to the size of the range selection?

    Also, I figure while I'm trying to make this more streamlined anyway, is there a way to integrate some VBA code to also have it save the file as something unique each time? Here's what I had in mind:

    Cell E1 has a date in it. It'd be cool if I could put some code into the existing code I have up there so it saves the file name as "SavedRange_DATE-IN-E1.jpg".
    I feel like this is doable, so if I can get the image portion sorted I'm sure I could figure out the saving aspect, but if anyone has input while you're here then hey, I'd love to hear it.

    Thanks!

  2. #2
    Forum Contributor
    Join Date
    05-12-2014
    MS-Off Ver
    Excel 2013
    Posts
    131

    Re: VBA to save range as an image with specific file name?

    Just wanted to bump this one time in the hopes that someone might be able to help. 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. Is there command to save clipboard as [image] file
    By riwiseuse in forum Excel General
    Replies: 0
    Last Post: 06-05-2016, 01:12 PM
  2. Save an image file of the print area on each worksheet
    By rs1aj in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-02-2016, 05:05 PM
  3. Edit an Image file and Save using VBA
    By SathishKumar in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-20-2015, 07:39 AM
  4. Save charts as image and incrementing file name
    By gee83 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-14-2014, 07:19 AM
  5. [SOLVED] Read-Only file needs to be Save As to specific folder with Range Name
    By cariwest in forum Excel Programming / VBA / Macros
    Replies: 29
    Last Post: 08-02-2012, 11:20 AM
  6. Re: Convert, export, or save Word as an image file (jpg, gif, png, etc
    By rjamison in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-13-2005, 08:05 PM
  7. [SOLVED] Convert, export, or save Word as an image file (jpg, gif, png, etc
    By quartz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-20-2005, 12:06 PM

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