How to remove a drawn chart object using VBA.
I have a school project that requires me to draw a polygon on a chart
(through VBA), then using a macro button, change the points of the polygon and re-draw it. I must eliminate the first polygon before, or immediately after drawing the second one. This way it will look like it's rotating around an axis. I have the points drawn, I have the polygon filled in with color. I can rotate the nodes if I use CNTL =. I need to be able to press a button, have CNTL plus = function properly, then remove the first polygon and draw the next one. Help anyone? -- Raas |
How to remove a drawn chart object using VBA.
Hi,
Jon Peltier has a page detailing drawing polygons on charts which should prove useful reading. http://peltiertech.com/Excel/Charts/VBAdraw.html Cheers Andy Raas wrote: I have a school project that requires me to draw a polygon on a chart (through VBA), then using a macro button, change the points of the polygon and re-draw it. I must eliminate the first polygon before, or immediately after drawing the second one. This way it will look like it's rotating around an axis. I have the points drawn, I have the polygon filled in with color. I can rotate the nodes if I use CNTL =. I need to be able to press a button, have CNTL plus = function properly, then remove the first polygon and draw the next one. Help anyone? -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info |
How to remove a drawn chart object using VBA.
Good try, but this link only showed how to draw the polygon, not delete and
redraw. I do appreciate the information for other purposes however. I did figure it out myself. Thanks -- Raas "Raas" wrote: I have a school project that requires me to draw a polygon on a chart (through VBA), then using a macro button, change the points of the polygon and re-draw it. I must eliminate the first polygon before, or immediately after drawing the second one. This way it will look like it's rotating around an axis. I have the points drawn, I have the polygon filled in with color. I can rotate the nodes if I use CNTL =. I need to be able to press a button, have CNTL plus = function properly, then remove the first polygon and draw the next one. Help anyone? -- Raas |
How to remove a drawn chart object using VBA.
I assume then that you worked out you need something like.
Activechart.Shapes(1).Delete Raas wrote: Good try, but this link only showed how to draw the polygon, not delete and redraw. I do appreciate the information for other purposes however. I did figure it out myself. Thanks -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info |
All times are GMT +1. The time now is 04:31 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com