John McGraw
Board Regular
- Joined
- Feb 25, 2002
- Messages
- 76
I would like to know if I can move and scale charts in VBA relative to a cell rather then pixel by pixel.
I turn on the macro recorder and watched it do its thing while I move the chart, but it spits out stuff like ".incrementLeft 200.0" and ".IncrementTop 9#".
I want to be able to write code to automaticaly move a chart based on cell values rather than these .increment values which look like pixel values. Is this possible? How would I do it?
If an example would help to clarify, this is something I would like to do:
- Move the top left hand corner of a chart
to the top-left-hand corner of cell B3
- Select the botom right corner of the
chart and scale it to the bottom right
hand corner of cell G7.
This would give me a chart perfectly covering the range B3:G7.
I hope that makes sense! Thanks much!
I turn on the macro recorder and watched it do its thing while I move the chart, but it spits out stuff like ".incrementLeft 200.0" and ".IncrementTop 9#".
I want to be able to write code to automaticaly move a chart based on cell values rather than these .increment values which look like pixel values. Is this possible? How would I do it?
If an example would help to clarify, this is something I would like to do:
- Move the top left hand corner of a chart
to the top-left-hand corner of cell B3
- Select the botom right corner of the
chart and scale it to the bottom right
hand corner of cell G7.
This would give me a chart perfectly covering the range B3:G7.
I hope that makes sense! Thanks much!