+ Reply to Thread
Results 1 to 8 of 8

Delete Chartsheet

  1. #1
    Forum Contributor HerryMarkowitz's Avatar
    Join Date
    09-10-2012
    Location
    Europe
    MS-Off Ver
    Office 2021 - Win10
    Posts
    1,007

    Delete Chartsheet

    Greetings,
    You know there are two type of sheets.
    1- Worksheet
    2- Chartsheet

    Open enclosed file and run Macro1.
    Please Login or Register  to view this content.
    Why Chartsheet can not be deleted ?

    Regards
    Attached Files Attached Files
    Sub DontForgetThese()
         If Your thread includes any code Then Please use code tags...
         If Your thread has been solved Then Please mark as solved...
         If Anybody has helped to you Then Please add reputation...
    End Sub

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Delete Chartsheet

    Please Login or Register  to view this content.

  3. #3
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Delete Chartsheet

    I think you are confusing the "worksheets" collection (http://msdn.microsoft.com/en-us/libr...ice.15%29.aspx ) that contains all the "worksheet" objects in a workbook and the "sheets" collection (http://msdn.microsoft.com/en-us/libr...ice.15%29.aspx ) which contains both chart sheets and worksheets. Conceptually, it seems like it should work if you adjust the code to use the sheets collection.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  4. #4
    Forum Contributor HerryMarkowitz's Avatar
    Join Date
    09-10-2012
    Location
    Europe
    MS-Off Ver
    Office 2021 - Win10
    Posts
    1,007

    Re: Delete Chartsheet

    Hi AB33,
    Thanks for the code.
    Last edited by HerryMarkowitz; 08-11-2014 at 06:14 PM.

  5. #5
    Forum Contributor HerryMarkowitz's Avatar
    Join Date
    09-10-2012
    Location
    Europe
    MS-Off Ver
    Office 2021 - Win10
    Posts
    1,007

    Re: Delete Chartsheet

    Hi MrShorty,
    Yes you are right.
    I was confusing sheet and worksheet.
    But now I understand the difference.
    Thanks for the information.

  6. #6
    Forum Contributor HerryMarkowitz's Avatar
    Join Date
    09-10-2012
    Location
    Europe
    MS-Off Ver
    Office 2021 - Win10
    Posts
    1,007

    Re: Delete Chartsheet

    My last question regarding this issue is that why following code has an error for chartsheets...
    Please Login or Register  to view this content.
    I mean if ThisWorkbook includes above code and if you add new chartsheet to workbook, above code makes error...
    Last edited by HerryMarkowitz; 08-11-2014 at 06:17 PM.

  7. #7
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Delete Chartsheet

    Again, it is probably misunderstanding of the difference between the "activewindow" object (that probably does not refer to any chart even if the chart is currently active object) (http://msdn.microsoft.com/en-us/libr...ice.15%29.aspx )and the "activechart" object (http://msdn.microsoft.com/en-us/libr...ice.15%29.aspx ). Depending on how this code snippet fits into the broader project, you may also need to understand the "selection" object, the "activeworkbook" object, the "activesheet" object, and so on.

    As these kind of questions seem to center around how well we understand Excel's object model, you might spend some time with this: http://msdn.microsoft.com/en-us/libr...ice.15%29.aspx and trying to understand what is meant by each object and how to reference specific elements within Excel.

  8. #8
    Forum Contributor HerryMarkowitz's Avatar
    Join Date
    09-10-2012
    Location
    Europe
    MS-Off Ver
    Office 2021 - Win10
    Posts
    1,007

    Re: Delete Chartsheet

    Thank you very much.
    Last edited by HerryMarkowitz; 08-12-2014 at 03:19 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 4
    Last Post: 04-15-2014, 02:22 AM
  2. Replies: 0
    Last Post: 04-14-2014, 04:02 AM
  3. Replies: 1
    Last Post: 01-17-2012, 06:43 AM
  4. RangeFromPoint ... on a chartsheet ?
    By MrT in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-19-2006, 09:35 AM
  5. [SOLVED] 1 ChartSheet, 10 worksheets
    By Martin Wheeler in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 01-22-2005, 06:06 PM

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