PDA

View Full Version : Vba for Export Pic



clif
01-10-2010, 12:42 AM
Sub Save_ChartAsImage()'Sheets("Chart").Select ActiveChart.ChartArea.SelectDim oCht As ChartSet oCht = ActiveChartoCht.Export Filename:="C:\abc.jpg", Filtername:="JPG" Sheets("update").Select'End Sub

Why have 1004 error

p45cal
01-10-2010, 02:34 AM
If you delete the old c:\abc.jpg first, does it error still?
Is there such a c: drive?
Do you have pemissions to write to it?

clif
01-10-2010, 03:39 AM
1. Still have error even i delete
2. yes i have c drive
3. yes i have the permission

p45cal
01-10-2010, 04:08 AM
are you working on a Mac?

clif
01-10-2010, 08:17 AM
No

p45cal
01-10-2010, 11:01 AM
Is JPG one of the entries under
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Graphics Filters\Export

in the registry?

See here msg #6: http://www.ozgrid.com/forum/showthread.php?t=29481 regarding installing the graphics filters.
Could it be that you should use "JPEG" instead of "JPG"

Otherwise, I'm stumped.

clif
01-21-2010, 06:40 AM
Yes, then how to solve?

p45cal
01-21-2010, 07:56 AM
In that case, as I said, I'm stumped (=I don't know what the solution is).