I’m trying to record a macro that will get data from a row on sheet 2,
create a chart and place it on sheet 1 and then move the chart to say
row 20. This will be nested inside a loop so that next time a chart is
created it will be placed at row 40. So that when a page is printed,
each will have a different chart in the same place as the previous
page.
I have managed to get the chart on sheet 1; problem is they all
get placed on top of one another and in the middle of the sheet. I have
tried dragging while recording but then the problem is trying to
calculate the number to get it placed in the exact position lower down
the sheet.Rich….--
ExcelUser123
------------------------------------------------------------------------
ExcelUser123's Profile: www.excelforum.com/member.php...oamp;userid=34448
View this thread: www.excelforum.com/showthread...hreadid=542652Hi,
Top position the activechart object use it .Parent.Top property.
So something like this,
activechart.Parent.top = activesheet.rows(20).top
obviously you will need to use a variable to increment the actual row
number.
Cheers
Andy
ExcelUser123 wrote:
gt; I’m trying to record a macro that will get data from a row on sheet 2,
gt; create a chart and place it on sheet 1 and then move the chart to say
gt; row 20. This will be nested inside a loop so that next time a chart is
gt; created it will be placed at row 40. So that when a page is printed,
gt; each will have a different chart in the same place as the previous
gt; page.
gt; I have managed to get the chart on sheet 1; problem is they all
gt; get placed on top of one another and in the middle of the sheet. I have
gt; tried dragging while recording but then the problem is trying to
gt; calculate the number to get it placed in the exact position lower down
gt; the sheet.
gt;
gt;
gt; Rich….
gt;
gt;
--
Andy Pope, Microsoft MVP - Excel
www.andypope.info
Brilliant just what i was looking for, thanks for your help.
Rich.... --
ExcelUser123
------------------------------------------------------------------------
ExcelUser123's Profile: www.excelforum.com/member.php...oamp;userid=34448
View this thread: www.excelforum.com/showthread...hreadid=542652
- Aug 07 Thu 2008 20:45
How do i move a chart
close
全站熱搜
留言列表
發表留言
留言列表

