+ Reply to Thread
Results 1 to 3 of 3

.SeriesCollection(2).Name and .Deselect

  1. #1
    Peter Sie
    Guest

    .SeriesCollection(2).Name and .Deselect

    I have more than 10,000 lines of VBA code in one aplication. When kicked off
    initially I received the following message during open of my application:

    "Prop bitmap DLL not loaded". What can I do to overcome this problem or is
    there a fix for it?

    Using a second ".Name" or a second ".XValues" command in Excel for charting
    creates a dump which I replied yes to submit to MS. This error totally
    destroys Excel's code checking feature (simple .LineType commands will prior
    to this abnormal end be processed ok, however, after this abnormal end it is
    being flagged as an invalid command). I had to repair Office 2007 in order to
    restore my Office 2007 environment.

    Here is an example of my code which fails:

    With ActiveChart
    .Select
    .SetSourceData Source:=Sheets("Life").Range("B1:C" & Max_Year + 2),
    PlotBy:=xlColumns
    .HasTitle = True
    .ChartTitle.Text = "Life length calculated from data on the DataBase
    Sheet. " + Scope + " scope." + vbCr + "Graph produced: " + Str(Now()) + "."
    .SeriesCollection(1).Name = "Number of deaths at a particular age."
    ' Office 2007 bug .SeriesCollection(2).Name = "Average 5 Trendline"
    .Axes(xlCategory, xlPrimary).HasTitle = True
    .Axes(xlCategory, xlPrimary).AxisTitle.Text = "Age when dying for" +
    Str(ii - 3) + " family members."
    .Axes(xlValue, xlPrimary).HasTitle = True
    .Axes(xlValue, xlPrimary).AxisTitle.Text = "Frequency of deaths"
    .HasAxis(xlCategory, xlPrimary) = True
    .HasAxis(xlValue, xlPrimary) = True
    .Axes(xlCategory, xlPrimary).CategoryType = xlAutomatic
    .SeriesCollection(1).XValues = "=Life!R1C1:R" & Max_Year + 2 & "C1"
    ' Office 2007 bug .SeriesCollection(2).XValues = "=Life!R1C1:R" &
    Max_Year + 2 & "C1"
    '.Deselect
    End With

    The ".Deselect" command is no longer allowed.

    ".Characters" is no longer supported either, it has to be left out in Office
    2007, example:
    With ActiveChart
    .HasTitle = True
    .ChartTitle.Characters.Text = "Age distribution."
    .Axes(xlCategory, xlPrimary).HasTitle = True
    .Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "All
    persons."
    .Axes(xlValue, xlPrimary).HasTitle = True
    .Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "Age in years."
    End With

    Cheers,
    Peter Sie.

  2. #2
    Jon Peltier
    Guest

    Re: .SeriesCollection(2).Name and .Deselect

    Does the code work in Excel 2003? Then you should assume that by the time
    the Beta has been tested and fixed up, that the code will work in Excel
    2007. You do know that's what a Beta is for, right?

    I'm not sure what I'm allowed to say about specifics, but the Excel team is
    trying to maintain backwards compatibility, and .Characters is one of the
    things that I believe they will fix before RTM. Some of the code dealing
    with chart data is a bit flaky too.

    PS. Why are you using + instead of & for concatenation?

    - Jon
    -------
    Jon Peltier, Microsoft Excel MVP
    Tutorials and Custom Solutions
    http://PeltierTech.com
    _______


    "Peter Sie" <Peter [email protected]> wrote in message
    news:[email protected]...
    >I have more than 10,000 lines of VBA code in one aplication. When kicked
    >off
    > initially I received the following message during open of my application:
    >
    > "Prop bitmap DLL not loaded". What can I do to overcome this problem or is
    > there a fix for it?
    >
    > Using a second ".Name" or a second ".XValues" command in Excel for
    > charting
    > creates a dump which I replied yes to submit to MS. This error totally
    > destroys Excel's code checking feature (simple .LineType commands will
    > prior
    > to this abnormal end be processed ok, however, after this abnormal end it
    > is
    > being flagged as an invalid command). I had to repair Office 2007 in order
    > to
    > restore my Office 2007 environment.
    >
    > Here is an example of my code which fails:
    >
    > With ActiveChart
    > .Select
    > .SetSourceData Source:=Sheets("Life").Range("B1:C" & Max_Year + 2),
    > PlotBy:=xlColumns
    > .HasTitle = True
    > .ChartTitle.Text = "Life length calculated from data on the DataBase
    > Sheet. " + Scope + " scope." + vbCr + "Graph produced: " + Str(Now()) +
    > "."
    > .SeriesCollection(1).Name = "Number of deaths at a particular age."
    > ' Office 2007 bug .SeriesCollection(2).Name = "Average 5 Trendline"
    > .Axes(xlCategory, xlPrimary).HasTitle = True
    > .Axes(xlCategory, xlPrimary).AxisTitle.Text = "Age when dying for" +
    > Str(ii - 3) + " family members."
    > .Axes(xlValue, xlPrimary).HasTitle = True
    > .Axes(xlValue, xlPrimary).AxisTitle.Text = "Frequency of deaths"
    > .HasAxis(xlCategory, xlPrimary) = True
    > .HasAxis(xlValue, xlPrimary) = True
    > .Axes(xlCategory, xlPrimary).CategoryType = xlAutomatic
    > .SeriesCollection(1).XValues = "=Life!R1C1:R" & Max_Year + 2 & "C1"
    > ' Office 2007 bug .SeriesCollection(2).XValues = "=Life!R1C1:R" &
    > Max_Year + 2 & "C1"
    > '.Deselect
    > End With
    >
    > The ".Deselect" command is no longer allowed.
    >
    > ".Characters" is no longer supported either, it has to be left out in
    > Office
    > 2007, example:
    > With ActiveChart
    > .HasTitle = True
    > .ChartTitle.Characters.Text = "Age distribution."
    > .Axes(xlCategory, xlPrimary).HasTitle = True
    > .Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "All
    > persons."
    > .Axes(xlValue, xlPrimary).HasTitle = True
    > .Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "Age in
    > years."
    > End With
    >
    > Cheers,
    > Peter Sie.




  3. #3
    Peter Sie
    Guest

    Re: .SeriesCollection(2).Name and .Deselect

    Jon,

    Thank you for your reply which I appreciate. I assumed actually that when
    the 2007 Beta eventually is released it will be backward compatible as any
    previous releases were.

    Yes, the example code works in 2003.

    I normally use "&" but in the example I submitted I used "+".

    I'll be happy to send you a DVD with my complete complex VBA application,
    the current 2007 Beta presents many other problems at the moment and is
    causing catastrofic problems and crashes causing dumps to be submitted to MS.

    If you supply me with an email with a postal address I'll be happy to assist
    with a DVD with my VBA application.

    Best regards,
    Peter Sie.

    "Jon Peltier" wrote:

    > Does the code work in Excel 2003? Then you should assume that by the time
    > the Beta has been tested and fixed up, that the code will work in Excel
    > 2007. You do know that's what a Beta is for, right?
    >
    > I'm not sure what I'm allowed to say about specifics, but the Excel team is
    > trying to maintain backwards compatibility, and .Characters is one of the
    > things that I believe they will fix before RTM. Some of the code dealing
    > with chart data is a bit flaky too.
    >
    > PS. Why are you using + instead of & for concatenation?
    >
    > - Jon
    > -------
    > Jon Peltier, Microsoft Excel MVP
    > Tutorials and Custom Solutions
    > http://PeltierTech.com
    > _______
    >
    >
    > "Peter Sie" <Peter [email protected]> wrote in message
    > news:[email protected]...
    > >I have more than 10,000 lines of VBA code in one aplication. When kicked
    > >off
    > > initially I received the following message during open of my application:
    > >
    > > "Prop bitmap DLL not loaded". What can I do to overcome this problem or is
    > > there a fix for it?
    > >
    > > Using a second ".Name" or a second ".XValues" command in Excel for
    > > charting
    > > creates a dump which I replied yes to submit to MS. This error totally
    > > destroys Excel's code checking feature (simple .LineType commands will
    > > prior
    > > to this abnormal end be processed ok, however, after this abnormal end it
    > > is
    > > being flagged as an invalid command). I had to repair Office 2007 in order
    > > to
    > > restore my Office 2007 environment.
    > >
    > > Here is an example of my code which fails:
    > >
    > > With ActiveChart
    > > .Select
    > > .SetSourceData Source:=Sheets("Life").Range("B1:C" & Max_Year + 2),
    > > PlotBy:=xlColumns
    > > .HasTitle = True
    > > .ChartTitle.Text = "Life length calculated from data on the DataBase
    > > Sheet. " + Scope + " scope." + vbCr + "Graph produced: " + Str(Now()) +
    > > "."
    > > .SeriesCollection(1).Name = "Number of deaths at a particular age."
    > > ' Office 2007 bug .SeriesCollection(2).Name = "Average 5 Trendline"
    > > .Axes(xlCategory, xlPrimary).HasTitle = True
    > > .Axes(xlCategory, xlPrimary).AxisTitle.Text = "Age when dying for" +
    > > Str(ii - 3) + " family members."
    > > .Axes(xlValue, xlPrimary).HasTitle = True
    > > .Axes(xlValue, xlPrimary).AxisTitle.Text = "Frequency of deaths"
    > > .HasAxis(xlCategory, xlPrimary) = True
    > > .HasAxis(xlValue, xlPrimary) = True
    > > .Axes(xlCategory, xlPrimary).CategoryType = xlAutomatic
    > > .SeriesCollection(1).XValues = "=Life!R1C1:R" & Max_Year + 2 & "C1"
    > > ' Office 2007 bug .SeriesCollection(2).XValues = "=Life!R1C1:R" &
    > > Max_Year + 2 & "C1"
    > > '.Deselect
    > > End With
    > >
    > > The ".Deselect" command is no longer allowed.
    > >
    > > ".Characters" is no longer supported either, it has to be left out in
    > > Office
    > > 2007, example:
    > > With ActiveChart
    > > .HasTitle = True
    > > .ChartTitle.Characters.Text = "Age distribution."
    > > .Axes(xlCategory, xlPrimary).HasTitle = True
    > > .Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "All
    > > persons."
    > > .Axes(xlValue, xlPrimary).HasTitle = True
    > > .Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "Age in
    > > years."
    > > End With
    > >
    > > Cheers,
    > > Peter Sie.

    >
    >
    >


+ 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