ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Variable Chart Elevation & Rotation (https://www.excelbanter.com/excel-programming/420867-variable-chart-elevation-rotation.html)

Fan924

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

Fan924

Variable Chart Elevation & Rotation
 
Got it. Alzheimers moment has past.


All times are GMT +1. The time now is 10:55 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com