Hello, I'm trying to get my graph into a specified range. I'm trying to make the range for the graph dependent on the dimensions of the table next to it (for uniformity and neatness). I'm getting an error on how I defined my range. Current values of F and T are 0 and 6 respectively. Also, I found this code online that uses a loop, how do I set the chart dimensions for the active chart only?
Also here: http://www.ozgrid.com/forum/showthread.php?p=430537#
Code:
Set rng = ActiveSheet.Range(Range("A13").Offset(F, 0), Range("A14").Offest(8 + T, 7))
For x = 1 To ActiveSheet.Shapes.Count
If ActiveSheet.Shapes(x).Type = msoChart Then
ActiveSheet.Shapes(x).Width = rng.Width
ActiveSheet.Shapes(x).Height = rng.Height
ActiveSheet.Shapes(x).Top = rng.Top
ActiveSheet.Shapes(x).Left = rng.Left
End If
Next