BrianExcel
Well-known Member
- Joined
- Apr 21, 2010
- Messages
- 975
The following code works great for cycling through several charts (with incremental names) to set the height and width...
I'd like to add something within this block of code (if possible) that allows me to set the .top and .left properties of each one individually.
OR, if that's not possible, is it possible to add something within this block of code to accomplish the same thing? I have one of these blocks for each chart...
Thanks in advance.
VBA Code:
For Each sh In Worksheets
If sh.ChartObjects.Count > 0 Then
For i2 = 1 To sh.ChartObjects.Count
sh.ChartObjects(i2).Height = 252
sh.ChartObjects(i2).Width = 468
Next i2
End If
Next sh
I'd like to add something within this block of code (if possible) that allows me to set the .top and .left properties of each one individually.
OR, if that's not possible, is it possible to add something within this block of code to accomplish the same thing? I have one of these blocks for each chart...
Code:
With ActiveChart
.ChartTitle.Select
.ChartTitle.Text = "Edit Percentage"
Selection.Format.TextFrame2.TextRange.Characters.Text = "Edit Percentage" & vbCrLf & res
.Axes(xlCategory).AxisTitle.Select
.Axes(xlCategory, xlPrimary).AxisTitle.Text = "Location"
Selection.Format.TextFrame2.TextRange.Characters.Text = "Venue" & vbCrLf & sChartTitle2
'.FullSeriesCollection(1).XValues = "='7DayEdits'!$A$2:$A$55"
.FullSeriesCollection(1).XValues = ActiveWorkbook.ActiveSheet.Range(Cells(1, 1), Cells(1, 1).End(xlDown))
.Axes(xlCategory).Select
Selection.TickLabels.Orientation = xlUpward
End With
Thanks in advance.