+ Reply to Thread
Results 1 to 2 of 2

Delete a chart in VBA

Hybrid View

markv Delete a chart in VBA 11-05-2010, 12:56 PM
Andy Pope Re: Trying to delete a chart... 11-06-2010, 08:46 AM
  1. #1
    Registered User
    Join Date
    06-08-2010
    Location
    Cincinnati
    MS-Off Ver
    Excel 2000
    Posts
    28

    Delete a chart in VBA

    I'm trying to delete a chart in my 2010 code that works in 2000 with chartarea.select, then selection.delete. Is there different code for 2010?

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,482

    Re: Trying to delete a chart in Excel 2010 VBA

    Charts changed back in xl2007.

    I can not get you code to work in xl2000 or xl2003 or xl2007.

    If the chart is a chartsheet then
    activechart.chartarea.select
    selection.parent.delete
    If the chart is a chartobject on a worksheet then
    activechart.chartarea.select
    selection.parent.parent.delete
    Cheers
    Andy
    www.andypope.info

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1