Prev: Treewalker for MSXML2 in VB6
Next: Predefined gradients
From: sunlite on 27 Jul 2010 12:25 Actually tlSeries1Trend.Type = chConstants.chTrendlineTypePolynomial works well in vb6. and it's the same with the google link you provide:) thx for your link anyway. it'll be better if there is a parameter after " chConstants.chTrendlineTypePolynomial " to show a 4 order Polynomial curve. If there is not such a parameter, perhaps we have to resort to .NET. "se" wrote: > > "sunlite" <sunlite(a)discussions.microsoft.com> skrev i en meddelelse > news:A6599FCC-3C13-42FF-AD88-DC1039384429(a)microsoft.com... > > Hi there, > > > > How to display 4 order Polynomial equation from the Excel in VB6 ? > > > > I can display the Polynomial equation by the following code, onething > > unsatisfactory it returns a 2 order Polynomial equation by default. but I > > need to get the > > 4 order Polynomial equation for further process. > > > > Your earliest reply will be highly appreciated! > > > > ' Set the trendline to be a Logarithmic trendline. > > tlSeries1Trend.Type = chConstants.chTrendlineTypePolynomial > > > > Have a nice week end > > Try this. One of the best. You probably should pick > "exel Programming" or "exel General" > http://www.excelforum.com/ > It's unclear what you mean. Never seen this line before: > tlSeries1Trend.Type = chConstants.chTrendlineTypePolynomial > Such coding does not exist in vb6. > Did you google ? > See this: > http://msdn.microsoft.com/en-us/library/aa190545%28office.10%29.aspx > > > > . >
From: se on 27 Jul 2010 14:11 "sunlite" <sunlite(a)discussions.microsoft.com> skrev i meddelelsen news:CFDA81B4-A717-4EE4-BAB1-15B78054F0A6(a)microsoft.com... > Actually tlSeries1Trend.Type = chConstants.chTrendlineTypePolynomial > works well in vb6. and it's the same with the google link you provide:) > > thx for your link anyway. > > it'll be better if there is a parameter after " > chConstants.chTrendlineTypePolynomial " to show a 4 order Polynomial > curve. > > If there is not such a parameter, perhaps we have to resort to .NET. > Works well in exel automation with vb6, I presume. I thought I was looking at VBA -Never mind !. ..Net what's that ? ah... .nxt > "se" wrote: > >> >> "sunlite" <sunlite(a)discussions.microsoft.com> skrev i en meddelelse >> news:A6599FCC-3C13-42FF-AD88-DC1039384429(a)microsoft.com... >> > Hi there, >> > >> > How to display 4 order Polynomial equation from the Excel in VB6 ? >> > >> > I can display the Polynomial equation by the following code, onething >> > unsatisfactory it returns a 2 order Polynomial equation by default. but >> > I >> > need to get the >> > 4 order Polynomial equation for further process. >> > >> > Your earliest reply will be highly appreciated! >> > >> > ' Set the trendline to be a Logarithmic trendline. >> > tlSeries1Trend.Type = chConstants.chTrendlineTypePolynomial >> > >> > Have a nice week end >> >> Try this. One of the best. You probably should pick >> "exel Programming" or "exel General" >> http://www.excelforum.com/ >> It's unclear what you mean. Never seen this line before: >> tlSeries1Trend.Type = chConstants.chTrendlineTypePolynomial >> Such coding does not exist in vb6. >> Did you google ? >> See this: >> http://msdn.microsoft.com/en-us/library/aa190545%28office.10%29.aspx >> >> >> >> . >>
From: sunlite on 28 Jul 2010 11:54 thanks Se and Paul. It works with the help of the links you recommended.! Use this code: " Order:=4 " Thanks! Actually my Excel works background because I just want to leverage the equation it returns. At the same time, I use a ChartSpace control in foreground to show the same 4 order Polynomial curve with the following code.Same question with the above solved Excel question, the Chartspace control just returns a 2 order Polynomial curve which I prefer that of 4 order. I tried to insert the parameter of " order = 4 " in somewhere of the following code but failed. Would you please solved this my last mile project question for me? My chartSpace code as follows: Dim chConstants Dim axValueAxis Dim chtChart1 Set chConstants = ChartSpace1.Constants ' Set the data source of ChartSpace1 to Spreadsheet1. Set ChartSpace1.DataSource = Me.sdstPlatevalue ' Set a variable to a new chart in Chartspace1. Set chtChart1 = ChartSpace1.Charts.Add ' Set the chart type. chtChart1.Type = chConstants.chChartTypeScatterMarkers chtChart1.SetData chConstants.chDimXValues, chConstants.chDataBound, "A1:A5" chtChart1.SetData chConstants.chDimYValues, chConstants.chDataBound, "B1:B5" Set axValueAxis = ChartSpace1.Charts(0).Axes(0) ' The following two lines of code turn off the major and ' minor gridlines for the value axis. axValueAxis.HasMajorGridlines = False axValueAxis.HasMinorGridlines = False Set axValueAxis = ChartSpace1.Charts(0).Axes(1) ' The following two lines of code turn off the major and ' minor gridlines for the value axis. axValueAxis.HasMajorGridlines = False axValueAxis.HasMinorGridlines = False Dim serSeries1 'Dim chConstants Dim tlSeries1Trend ' Set chConstants = ChartSpace1.Constants ' Set a variable to the first series of the first chart ' in Chartspace1. Set serSeries1 = ChartSpace1.Charts(0).SeriesCollection(0) ' Add a trendline to the first series and return ' a Trendline object. Set tlSeries1Trend = serSeries1.Trendlines.Add ' Display the equation used to calculate the trendline. tlSeries1Trend.IsDisplayingEquation = False tlSeries1Trend.IsDisplayingRSquared = False ' Set the trendline to be a polynomial trendline. tlSeries1Trend.Type = chConstants.chTrendlineTypePolynomial "se" wrote: > > "sunlite" <sunlite(a)discussions.microsoft.com> skrev i meddelelsen > news:CFDA81B4-A717-4EE4-BAB1-15B78054F0A6(a)microsoft.com... > > Actually tlSeries1Trend.Type = chConstants.chTrendlineTypePolynomial > > works well in vb6. and it's the same with the google link you provide:) > > > > thx for your link anyway. > > > > it'll be better if there is a parameter after " > > chConstants.chTrendlineTypePolynomial " to show a 4 order Polynomial > > curve. > > > > If there is not such a parameter, perhaps we have to resort to .NET. > > > > Works well in exel automation with vb6, I presume. > I thought I was looking at VBA > -Never mind !. > ..Net what's that ? > ah... .nxt > > > > "se" wrote: > > > >> > >> "sunlite" <sunlite(a)discussions.microsoft.com> skrev i en meddelelse > >> news:A6599FCC-3C13-42FF-AD88-DC1039384429(a)microsoft.com... > >> > Hi there, > >> > > >> > How to display 4 order Polynomial equation from the Excel in VB6 ? > >> > > >> > I can display the Polynomial equation by the following code, onething > >> > unsatisfactory it returns a 2 order Polynomial equation by default. but > >> > I > >> > need to get the > >> > 4 order Polynomial equation for further process. > >> > > >> > Your earliest reply will be highly appreciated! > >> > > >> > ' Set the trendline to be a Logarithmic trendline. > >> > tlSeries1Trend.Type = chConstants.chTrendlineTypePolynomial > >> > > >> > Have a nice week end > >> > >> Try this. One of the best. You probably should pick > >> "exel Programming" or "exel General" > >> http://www.excelforum.com/ > >> It's unclear what you mean. Never seen this line before: > >> tlSeries1Trend.Type = chConstants.chTrendlineTypePolynomial > >> Such coding does not exist in vb6. > >> Did you google ? > >> See this: > >> http://msdn.microsoft.com/en-us/library/aa190545%28office.10%29.aspx > >> > >> > >> > >> . > >> > > . >
|
Pages: 1 Prev: Treewalker for MSXML2 in VB6 Next: Predefined gradients |