Excel 2016 - problems with macro that generates a jpg image since upgrade to Excel 2016
I have since the upgrade to Excel 2016 experienced a problem with a macro that generates a jpg image of a designated excel area. In the previous versions, it worked without problems but since the upgrade the macro only generates a blank jpg. Have anyone experienced something similar? The code is the following:
Public Function exportRange(area As Range, ws As Worksheet, path As String)
Application.ScreenUpdating = True
Application.DisplayAlerts = True
Dim output As String
Dim zoom_coef As Single
output = path
zoom_coef = 70 / ws.Parent.Windows(1).Zoom
Dim chartobj As ChartObject: Set chartobj = ws.ChartObjects.Add(0, 0, area.Width * zoom_coef, area.Height * zoom_coef)
chartobj.Chart.Export output, "jpg"
Last edited by NikHag; 12-19-2016 at 01:37 AM.
Re: Question You are subscribed to this thread Applies to Office Excel Windows 10 Office
Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution.
Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
To change a Title go to your first post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.
(This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
You must use code tags for all code
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
By yasar2002 in forum Excel General
Last Post: 08-07-2016, 05:52 PM
By amitmodi_mrt in forum Excel Programming / VBA / Macros
Last Post: 06-21-2016, 02:48 PM
By Suzyn in forum Excel General
Last Post: 05-24-2016, 10:43 PM
By AlKey in forum The Water Cooler
Last Post: 05-06-2016, 07:52 AM
By andikeep2580 in forum Excel Formulas & Functions
Last Post: 03-22-2016, 10:58 AM
By billd73 in forum Excel General
Last Post: 12-28-2015, 05:15 PM
By honeybadger_rgr in forum Excel General
Last Post: 12-10-2015, 12:19 PM
Search Engine Friendly URLs by vBSEO 3.6.0 RC 1