rkc2009
01-21-2009, 07:48 AM
Hello everyone,
I am having a slight difficulty in Excel Macros. I have a macro that creates a chart from a column of data and pastes it into a new sheet. The next step is that I want to shift the location of the chart in the sheet (i.e. I guess Excel calls it increments to the left-right-top-bottom), and it produces code such as this when I do the movements:
ActiveSheet.Shapes("Chart 49").IncrementLeft -166.5
ActiveSheet.Shapes("Chart 49").IncrementTop -51.75
The problem is I don't want the incrementation to pertain simply to Chart 49. I want it to be so that whichever active chart I have, it will increment it to the location I want it. Is there a specific way I can make this happen or am I stuck with this coding? Any suggestions would be great. If anyone needs more clarity, just post it.
I am having a slight difficulty in Excel Macros. I have a macro that creates a chart from a column of data and pastes it into a new sheet. The next step is that I want to shift the location of the chart in the sheet (i.e. I guess Excel calls it increments to the left-right-top-bottom), and it produces code such as this when I do the movements:
ActiveSheet.Shapes("Chart 49").IncrementLeft -166.5
ActiveSheet.Shapes("Chart 49").IncrementTop -51.75
The problem is I don't want the incrementation to pertain simply to Chart 49. I want it to be so that whichever active chart I have, it will increment it to the location I want it. Is there a specific way I can make this happen or am I stuck with this coding? Any suggestions would be great. If anyone needs more clarity, just post it.