A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Charts and Charting
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

.SeriesCollection(2).Name and .Deselect



 
 
Thread Tools Display Modes
  #1  
Old June 26th, 2006, 03:21 PM posted to microsoft.public.excel.charting
external usenet poster
 
Posts: n/a
Default .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  
Old June 30th, 2006, 05:58 AM posted to microsoft.public.excel.charting
external usenet poster
 
Posts: n/a
Default .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 wrote in message
...
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  
Old July 3rd, 2006, 03:10 AM posted to microsoft.public.excel.charting
external usenet poster
 
Posts: n/a
Default .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 wrote in message
...
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.




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:16 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.