.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
.SetSourceData Source:=Sheets("Life").Range("B1:C" & Max_Year + 2),
.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"
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
.Axes(xlValue, xlPrimary).HasTitle = True
.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "Age in years."
End With

Peter Sie.



Jon Peltier

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





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.

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question