LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Export Automation error

Peter you are right.
The second line is there just to test and verify that the string length
was not the problem.

Peter T a écrit :
This cannot be right -

NomFichierImage = ThisWorkbook.Path & "\" & Titre & ".gif"
NomFichierImage = "Test" & ".gif"

Assuming the workbook has been saved, ie has a path, I expect it will work
if 'Titre' has been assigned with a string and you comment or delete the
second line.

Regards,
Peter T



"Bernard Bourée" wrote in message
...
I have the following code

Dim NomFichierImage As String
NomFichierImage = "Test" & ".gif"
Activechart.Export Filename:=NomFichierImage, FilterName:="GIF"

The last line give an Automation Error.
What is wrong ?

Bernard
===========================================

The Activechart existe . The full code is the

Charts.Add
With ActiveChart
.ChartType = xlLineMarkers
For ir = 1 To nr
ReDim ValY(nv) As Double
ValY = GetValY(ValYs, ir)
.SeriesCollection.NewSeries
With .SeriesCollection(ir)
.Values = ValY
.XValues = ValX
.Name = LibY(ir)
End With
Next

.HasTitle = True
.ChartTitle.Characters.Text = Titre
.Axes(xlCategory, xlPrimary).HasTitle = True
.Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = LibAxeX
.Axes(xlValue, xlPrimary).HasTitle = False
'TODO Traiter le cas où les unités des Résultats ne sont pas
'au même format
.Axes(xlCategory).TickLabels.NumberFormat = FormatAxeY(1)
.Axes(xlValue).TickLabels.NumberFormat = FormatAxeX
.Location Whe=xlLocationAsObject, Name:="Graphiques"
'Sauvegarde du graphique
Dim NomFichierImage As String
Dim NomImage As String
NomFichierImage = ThisWorkbook.Path & "\" & Titre & ".gif"
NomFichierImage = "Test" & ".gif"
.Export Filename:=NomFichierImage, FilterName:="GIF"



 
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
Run-Time Error'-2147221080(800401a8)': Automation Error BEEJAY Excel Programming 1 July 18th 06 03:13 PM
Compile error automation error nikkiws Excel Programming 0 January 17th 06 08:24 AM
RunTime Error (Automation Error) KD[_3_] Excel Programming 3 January 25th 05 01:56 PM
Automation Error, Unknown Error. Error value - 440 Neo[_2_] Excel Programming 0 May 29th 04 05:26 AM
Unknown where is the problem on the Runtime error - Automation error wellie Excel Programming 1 July 10th 03 08:12 AM


All times are GMT +1. The time now is 11:25 PM.

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

About Us

"It's about Microsoft Excel"