Export chart to gif without border gives a white line under and right on gif

  • Thread starter Thread starter Sven Aeyels
  • Start date Start date
S

Sven Aeyels

Hi,

When I export a chart to gif (using vba, not save as web page) without
borders there 's a white line right and under the gif. Can I fix this? Has
anyone had this problem before?

Thanks in advance.

Kind regards,
Sven Aeyels.
 
Hi

I use this code to save a chart to gif. I used a little gif as background
color for the chart.

Worksheets("Jaar_2001").ChartObjects(1).Width = 659 / 96 * 72 ' resize
to 660
Worksheets("Jaar_2001").ChartObjects(1).Height = 359 / 96 * 72 ' resize
to 360
Worksheets("Jaar_2001").ChartObjects(1).Border.LineStyle = xlNone ' no
border

Dim mychart As Chart
Set mychart = Worksheets("Jaar_2001").ChartObjects(1).Chart
mychart.Export Filename:=ThisWorkbook.Path & Folder & "\Aantal.gif",
FilterName:="GIF"

I put a sample online at http://users.telenet.be/sven.aeyels/excel/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top