![]() |
Problem with the Excel 10.0 Object Library
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? |
Problem with the Excel 10.0 Object Library
MattEdwards wrote:
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:= I know nothing of VB.Net, but can you specify arguments by position as well as by name in the way that you can in VBA? If so why not NewRange.DataSeries (Excel.XlDataSeriesType.xlChronological, Excel.XlDataSeriesDate.xlWeekday) Bill Manville MVP - Microsoft Excel, Oxford, England No email replies please - reply in newsgroup |
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 |
Problem with the Excel 10.0 Object Library
Hi Bill,
I know nothing of VB.Net, but can you specify arguments by position as well as by name in the way that you can in VBA? Yes you can. If so why not NewRange.DataSeries (Excel.XlDataSeriesType.xlChronological, Excel.XlDataSeriesDate.xlWeekday) Because the first parameter is 'rowcol' <g, so we need an extra comma: NewRange.DataSeries (, Excel.XlDataSeriesType.xlChronological, Excel.XlDataSeriesDate.xlWeekday) Regards Stephen Bullen |
Problem with the Excel 10.0 Object Library
Stephen Bullen wrote:
Because the first parameter is 'rowcol' <g, so we need an extra comma: Well spotted. Thanks! I think my glasses must have needed cleaning this morning - I looked at help for DateSeries but completely missed the first parameter. Bill Manville MVP - Microsoft Excel, Oxford, England No email replies please - reply in newsgroup |
All times are GMT +1. The time now is 01:25 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com