Results 1 to 5 of 5

I am losing my ActiveChart.Name

Threaded View

  1. #1
    Registered User
    Join Date
    04-28-2009
    Location
    Chicago, IL, USA
    MS-Off Ver
    Excel 2007
    Posts
    30

    I am losing my ActiveChart.Name

    Excel 2007

    I'm trying to name the chart in my macro so the next time I run the macro I can delete the old chart. I use:

      Charts.Add
        ActiveChart.Name = "VIFreqByEng"
        ActiveChart.SetSourceData Source:=UpperLeft.Offset(1, 2).Resize(NumberOfBins + 3, 1)
        ActiveChart.SeriesCollection(1).XValues = UpperLeft.Offset(2, 1).Resize(NumberOfBins + 2, 1)
    And so on, and *right* after this stretch of code runs I can use the immediate window to print it and I get the generic name.

    Print ActiveChart.Name
    StatPack Chart 28
    Any idea why this is happening? There is only one thing I can think of at this point, and that is that when I set up the chart, I pull it back from its own sheet to the current "StatPack" worksheet using this:

    ActiveChart.Location Where:=xlLocationAsObject, Name:="StatPack"
    Is it possible that the chart moving out and back has it's name changed?
    Last edited by mattdick; 04-30-2009 at 11:20 AM.

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