To augment Andy's much more prompt response.
You can set the position and size of a chart when creating it in VBA.
Dim myChtObj As Chart Object
With ActiveSheet
Set myChtObj = .ChartObjects.Add(.Range("E5").Left, _
.Range("E5").Top, .Range("E5:L22").Width, _
.Range("E5:L22").Height)
End With
- Jon
-------
Jon Peltier, Microsoft Excel MVP
http://www.geocities.com/jonpeltier/Excel/index.html
_______
Andy Pope wrote:
> Hi Zzzbla,
>
> Use something like this,
>
> ActiveSheet.ChartObjects(1).Left = Range("E5").Left
> ActiveSheet.ChartObjects(1).Top = Range("E5").Top
>
>
> Zzzbla wrote:
>
>> Hi!
>>
>> I have to write some code that's supposed to create a report in Excel,
>> where some of the reports will contain more charts and some less
>> (because they have less data) and I have to create the charts
>> programmatically ofcourse.
>> My problem is that I couldn't figure out how to set the location of
>> the chart so it will be for example under a sepcific row in the sheet.
>>
>> Please post an answer!
>>
>> Thanks in advance!
>
>