Solved

Export to gif or jpg using excel

Posted on 2001-07-31
8
1,841 Views
Last Modified: 2010-08-23
I know there is a way to export charts as pictures in excel
I wish to have a couple of lines in VBA
that does that.

thanks

0
Comment
Question by:oreghe
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
8 Comments
 
LVL 16

Accepted Solution

by:
Richie_Simonetti earned 50 total points
ID: 6338579
Worksheets("Sheet1").ChartObjects(1) _
.Chart.Export _
    FileName:="current_sales.gif", FilterName:="GIF"
0
 
LVL 1

Author Comment

by:oreghe
ID: 6420167
I have been away.
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6420231
No problem!, you are welcome anytime.
Thanks for the points/grade
Cheers
0
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 

Expert Comment

by:jsbxpge
ID: 33489883
When I try this solution, I get a:

Run-time error '1004':
Application-defined or object-defined error

Any ideas on a solution?
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 33500929
well, that was a solution in Office97'Age i think.
Sure you are using at least a 2003, aren't you?

PD: anyway, just a guess, how many chart have you in worksheet?
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 33501009
by the way, your sheet is named "sheet1"?
try replacing sheet1 for just 1
0
 

Expert Comment

by:jsbxpge
ID: 33503096
I am using Excel 2003.  I have just one chart within a sheet. I tried renaming and am getting the same error.
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 33503737
i did try with excel 2007 and it continues working!!
maybe, and just maybe, the error not belongs to that line of code... just a guess (without furter info i can speculate only)
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Sending a email via excel using vba 6 115
VBA filters 2 81
Create Files based on Cell Values in a Range in Excel 12 44
transition to visual .net from vb6 5 77
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question