Function ChartProps(MySheetName As String, MyChtName As String) As String 'Make a CSV string of the properties of a Chart Dim chtObj As ChartObject, CSVStr As String Dim NumHCategs As Integer, n As Integer Dim tRng As Range, TempStr As String, seR As Series Set chtObj = Worksheets(MySheetName).ChartObjects(MyChtName) With chtObj CSVStr = .Chart.Name & "," & .Chart.ChartType & "," & Format(.Chart.ChartArea.Top, "0.0") & "," & Format(.Chart.ChartArea.Left, "0.0") CSVStr = CSVStr & "," & Format(.Chart.ChartArea.Height, "0.0") & "," & Format(.Chart.ChartArea.Width, "0.0") CSVStr = CSVStr & "," & Format(.Chart.PlotArea.InsideTop, "0.0") & "," & Format(.Chart.PlotArea.InsideLeft, "0.0") & "," & Format(.Chart.PlotArea.InsideHeight, "0.0") & "," & Format(.Chart.PlotArea.InsideWidth, "0.0") For Each seR In .Chart.SeriesCollection TempStr = ReadCSVStr(seR.Formula, 3) ' Debug.Print ReadCSVStr(seR.Formula, 2) Set tRng = Range(TempStr) If tRng.Columns.Count > NumHCategs Then NumHCategs = tRng.Columns.Count Next seR CSVStr = CSVStr & "," & Format(NumHCategs, "0") If .Chart.HasLegend = True Then CSVStr = CSVStr & "," & Format(.Chart.Legend.Top, "0.0") & "," & Format(.Chart.Legend.Left, "0.0") & "," & Format(.Chart.Legend.Height, "0.0") & "," & Format(.Chart.Legend.Width, "0.0") For Each seR In .Chart.SeriesCollection n = n + 1 Next If .Chart.ChartType = xlPie Then TempStr = ReadCSVStr(.Chart.SeriesCollection(1).Formula, 2) n = Range(TempStr).Rows.Count End If If .Chart.Legend.Position = xlLegendPositionBottom Then CSVStr = CSVStr & "," & .Chart.HasLegend & ", B, " & Format(n, "0") Else CSVStr = CSVStr & "," & .Chart.HasLegend & ", R, " & Format(n, "0") End If Else ' no legend CSVStr = CSVStr & ", 0, 0, 0, 0, " & .Chart.HasLegend & ", X, 0" End If If .Chart.ChartType = xlPie Then CSVStr = CSVStr & ", " & Format(.Chart.ChartGroups(1).FirstSliceAngle, "0.0") Else CSVStr = CSVStr & ", 0" End If End With ChartProps = CSVStr End Function Sub ExpChart() ' *** create a GIF image for a single named chart *** Dim MyPath As String Dim objChrt As ChartObject, gPath As String, gDir As String, DirNo As Integer Dim myChart As Chart, StartRng As String, CCNo As Integer, MyFileName As String MyPath = "C:\MyData\" MyFileName = InputBox("Enter the chart name ...", "ExpChart()", "Chart 1") Set objChrt = ActiveSheet.ChartObjects(MyFileName) Set myChart = objChrt.Chart MyFileName = MyPath & "Exp_" & MyFileName & ".gif" Debug.Print "Saving as: "; MyFileName On Error Resume Next Kill MyFileName On Error GoTo 0 myChart.Export Filename:=MyFileName, Filtername:="GIF" MsgBox "OK - file saved as" & vbCrLf & MyFileName, vbOKOnly, "MeadInKent" End Sub