View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Fan924 Fan924 is offline
external usenet poster
 
Posts: 238
Default Variable Chart Elevation & Rotation

Everything works, almost everything. It saves multiple images of a 3D
chart as I drag around one corner. I am trying to read ".Elevation" &
".Rotation " values from cells ("S1800:T1809"). I am having an
Alzheimers moment. Everything I try gets a debug error. I set
"MyElevation = 20" & "MyRotation = 40" just so I could debug the
rest. Excel 97
;(

Sub aElevation1()
Dim MyPath As String
Dim i As Long
Dim MyElevation As Variant
Dim MyRotation As Variant
Dim r As Range
MyElevation = 20
MyRotation = 40
MyPath = ActiveWorkbook.Path
i = 1
Range("S1800:T1809").Select
For Each r In Selection.Rows
ActiveSheet.ChartObjects(2).Chart.Export MyPath & "\gif\Chart" &
Format(i, "00") & ".gif", "GIF"
ActiveSheet.ChartObjects("Chart 2").Activate
ActiveChart.Corners.Select
With ActiveChart
.Elevation = MyElevation
.Rotation = MyRotation
End With
i = i + 1
Next r
End Sub