+ Reply to Thread
Results 1 to 5 of 5

Create multiple charts on multiple sheets

  1. #1
    Registered User
    Join Date
    02-08-2014
    Location
    Sverige
    MS-Off Ver
    Excel 2010
    Posts
    3

    Question Create multiple charts on multiple sheets

    Hi,
    I need some help with understanding why my macro behaves like it does.

    The macro creates multiple charts from data in one sheet, but now when I'm trying to scale it up to multiple sheets, the previous charts created disappear. E.g Creates 5 charts for sheet 1 (can see them being created, using debugger mode), looping to the next chart and they are created but the first ones has disappeared! What am I doing wrong? I'm creating my chart by the following code:
    Please Login or Register  to view this content.
    The startpoint variable is changed for every new chart within the one sheet and the outputsheet is changed when you change the sheet

    Thanks in advance
    Carl

  2. #2
    Valued Forum Contributor natefarm's Avatar
    Join Date
    04-22-2010
    Location
    Wichita, Kansas
    MS-Off Ver
    2016
    Posts
    1,020

    Re: Create multiple charts on multiple sheets

    Would you be able to attach the workbook with sample data?
    Acts 4:12
    Salvation is found in no one else, for there is no other name under heaven given to mankind by which we must be saved.

  3. #3
    Registered User
    Join Date
    02-08-2014
    Location
    Sverige
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Create multiple charts on multiple sheets

    Ok, here is my document..

    The 14 first sheets contain data from a simulation program (labeled: exp ...), which we change to a better format and trying to enter a chart for every train or station (we are simulating train departures). At the moment we only get charts for the last 2 out of 14 formated sheets (the 2 last, Esbjerg Niebull Train and Station). The remaining charts are deleted somehow when charts are created on the next sheet (able to see it from debug mode). The charts are created in sub writeDataStation and writeDataTrain, at the bottom.

    I know you were looking for a sample, but the sample code attached in my first post, so I post the whole thing.

    If you can't find the answer I can do it a more time consuming way

    Thanks in advance
    Carl
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor natefarm's Avatar
    Join Date
    04-22-2010
    Location
    Wichita, Kansas
    MS-Off Ver
    2016
    Posts
    1,020

    Re: Create multiple charts on multiple sheets

    In your "main" subroutine, you are looping through your 7 pairs of Train/Station sheets. The "clearsheets" deletes all charts in all sheets every time, leaving only the last pair uncleared when you're done.

  5. #5
    Registered User
    Join Date
    02-08-2014
    Location
    Sverige
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Create multiple charts on multiple sheets

    Thank you Forgot that one

+ 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: 0
    Last Post: 05-27-2007, 10:22 PM
  2. How do i auto create multiple files from 1 with multiple sheets
    By Kathy in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 PM
  3. [SOLVED] How do i auto create multiple files from 1 with multiple sheets
    By Kathy in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-25-2005, 09:05 PM

Tags for this Thread

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