View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Stephen Bullen Stephen Bullen is offline
external usenet poster
 
Posts: 67
Default Problem with the Excel 10.0 Object Library

Hi Matt,

I believe there is a bug when using the Excel 10.0 Object
Library DataSeries function in VB.Net 2003. I want to set
the Date parameter in the DataSeries function as follows
(the following variable NewRange is of type Excel.Range):

NewRange.DataSeries
(Type:=Excel.XlDataSeriesType.xlChronological,
Date:=Excel.XlDataSeriesDate.xlWeekday)

but VB.Net 2003 automatically changes Date:= to DateTime:=
as follows:

NewRange.DataSeries
(Type:=Excel.XlDataSeriesType.xlChronological,
DateTime:=Excel.XlDataSeriesDate.xlWeekday)

and errors stating DateTime is not a parameter of the
DataSeries function. Could someone give me a bug fix for
this problem?


There are Microsoft representatives who should know about this issue in
the Public.VSNet.VSTools.Office newsgroup. It looks to me like a bug
in the PIAs - that they're using a parameter name that is a reserved
keyword. I've posted a message in that newsgroup. The workaround is
to note use the named parameter, but to do it by position instead:

NewRange.DataSeries(, Excel.XlDataSeriesType.xlChronological, _
Excel.XlDataSeriesDate.xlWeekday)


Regards

Stephen Bullen
Microsoft MVP - Excel
www.BMSLtd.co.uk