+ Reply to Thread
Results 1 to 3 of 3

Titles on Charts in a loop

  1. #1
    Registered User
    Join Date
    10-29-2009
    Location
    Indiana
    MS-Off Ver
    Excel 2003
    Posts
    7

    Titles on Charts in a loop

    I have a problem with the following subset of code (full sub follows). I am trying to assign chart and axes titles to each chart. It is giving me an error (1004, Method 'hastitle' of object '_chart' has failed). I can't figure out why this isn't working. It properly activates the chart and applies the titles the first time through the loop, but doesn't work on subsequent loops to the new charts. It DOES create the charts properly if i disable the title section of the code.

    thanks.

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Last edited by jcfryman; 11-02-2009 at 08:38 AM.

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

    Re: Titles on Charts in a loop

    The code itself is okay. It is it's position. You can trying to set the titles for a chart with no current data.

    Populate the chart first then sort out chart and axis labels.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    10-29-2009
    Location
    Indiana
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Titles on Charts in a loop

    Thanks!

    I moved it to the end of each loop and it works perfect!

+ 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