Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,489
Default 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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,489
Default 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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Positioning a drawn line shape on a chart Tammy Charts and Charting in Excel 3 September 8th 08 03:04 PM
text boxes drawn objects do not appear on chart E.M. Charts and Charting in Excel 1 December 12th 06 10:38 PM
Copy Excel Chart (including drawn objects) into Word MarkN Charts and Charting in Excel 3 February 13th 06 02:09 PM
How do I measure area under a line chart drawn in Excel file? kp Charts and Charting in Excel 2 April 18th 05 02:01 PM
Prevent User from Deleting Drawn Object Tod Excel Programming 4 July 23rd 04 09:59 AM


All times are GMT +1. The time now is 08:42 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"