Creating and setting location for Excel Charts

Z

Zzzbla

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!
 
R

rkang2

I just found a sample on the web yesterday, this snippet will positio
the chart on the worksheet. I am not 100% sure if it is using absolut
or relative positioning, but in my case it looks like absolute.

With oWS.Shapes.Item("Chart 1")
.Top = oWS.Rows(10).Top
.Left = oWS.Columns(4).Left
End With
HT
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top