Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Request Vba code Export gif file

I have problem with code Excel-vba: I have this code

Private Sub make_Gif()
x = 22
For k = 1 To x
Dim mychart As Chart
Set mychart = Sheets("DATA").ChartObjects(k).Chart
mychart.Export Filename:="c:\" & k & ".gif", FilterName:="gif"
Next k
End Sub
This code is testing ok!
This code VBA, Export 22 charts to gif file format , named with number k (1-22)
c:\1.gif
c:\2.gif
c:\...
c:\22.gif
I want export this charts in c:\ChartTitle.Gif
c:\salesI.Gif
c:\salesII.Gif
c:\Integration.Gif
c:\.......
ChartTitle=Title of Chart



it's possible?

Plese help me
Thank for all!!

My e-mail:
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 100
Default Request Vba code Export gif file

Luig

Tr
mychart.Export Filename:="c:\" & mychart.charttitle.text & ".gif", FilterName:="gif
Ton

----- Luigi wrote: ----

I have problem with code Excel-vba: I have this cod

Private Sub make_Gif(
x = 2
For k = 1 To
Dim mychart As Char
Set mychart = Sheets("DATA").ChartObjects(k).Char
mychart.Export Filename:="c:\" & k & ".gif", FilterName:="gif
Next
End Su
This code is testing ok
This code VBA, Export 22 charts to gif file format , named with number k (1-22
c:\1.gi
c:\2.gi
c:\..
c:\22.gi
I want export this charts in c:\ChartTitle.Gi
c:\salesI.Gi
c:\salesII.Gi
c:\Integration.Gi
c:\......
ChartTitle=Title of Char



it's possible

Plese help m
Thank for all!

My e-mail:

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 99
Default Request Vba code Export gif file

Ho Luigi,

This should do the trick:

Private Sub make_Gif()
Dim k As Integer
Dim t As String
Dim mychart As Chart

For k = 1 To Sheets("blad1").ChartObjects.Count
Set mychart = Sheets("blad1").ChartObjects(k).Chart
t = mychart.ChartTitle.Caption
mychart.Export Filename:="c:\" & t & ".gif", FilterName:="gif"
Next k
End Sub


Good Luck

Wouter HM

(Luigi) wrote in message . com...
I have problem with code Excel-vba: I have this code

Private Sub make_Gif()
x = 22
For k = 1 To x
Dim mychart As Chart
Set mychart = Sheets("DATA").ChartObjects(k).Chart
mychart.Export Filename:="c:\" & k & ".gif", FilterName:="gif"
Next k
End Sub
This code is testing ok!
This code VBA, Export 22 charts to gif file format , named with number k (1-22)
c:\1.gif
c:\2.gif
c:\...
c:\22.gif
I want export this charts in c:\ChartTitle.Gif
c:\salesI.Gif
c:\salesII.Gif
c:\Integration.Gif
c:\.......
ChartTitle=Title of Chart



it's possible?

Plese help me
Thank for all!!

My e-mail:

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Thank Tony

This cosde Vba is ok!

mychart.Export Filename:="c:\" & mychart.charttitle.text & ".gif",
FilterName:="gif"

Thank very much, Tony
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Request for a code FARAZ QURESHI Excel Discussion (Misc queries) 0 January 27th 08 02:59 PM
export re-order input fields to export file [csv] madisonpete Excel Worksheet Functions 0 November 30th 07 03:51 PM
Code to raise Directory request box ANDYGM Excel Worksheet Functions 2 April 10th 06 11:47 AM
using a file dsn in sql.request to connect to sql server Tricia Excel Worksheet Functions 0 July 20th 05 06:07 PM
Export a form via code? [email protected] Excel Programming 4 January 26th 04 04:22 AM


All times are GMT +1. The time now is 02:30 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"