Help: Trend equation formula from Excel to VB program 
Author Message
 Help: Trend equation formula from Excel to VB program

Environment:

        Win32 (Windows NT, Windows95)
        Visual Basic 4.0 (32-bit)
        Office for Windows95
                Using Excel version 7.0

The problem:

From a Visual Basic program, I pass a number of values to Excel, in
order to create a graph, in which the trend is calculated and
displayed. Currently, the trend is calculated as lineair regression
(formula: y = mx + b). I found out is is possible to get the equation
in the graph, and to pass the graph to teh Visual Basic program for
display, but I have to use the equation in other calculations on data
in the program. Since the equation in itself is known, it is
sufficient to get the values of m and b from Excel into the VB
program. However, I could find no way of doing that.
In another program, I need not only lineair regression, but
non-lineair functions as well. I now know of the wanted use of
logarithmic display, and there are more. I assume that there are
different formulas for these, but these can be written in a generic
form (like y = mx + b for the lineair regression) - so if I know the
type of display, all I need are the parameters used (as m and b)

Can anyone tell me: is it possible to get these values (or the whole
string so I can retrieve the data in the program) and if so, how to
get it?

Please e-mail the answer to:

Internet:


MSN:
        Willem_Grooters
CompuServe:
        101500,3612



Mon, 06 Jul 1998 03:00:00 GMT  
 Help: Trend equation formula from Excel to VB program


Quote:
>Since the equation in itself is known, it is
>sufficient to get the values of m and b from Excel into the VB
>program.

Try looking into DDE. There is an example of how to do DDE with
Excel in the Knowledge Base:

DDE from Visual Basic for Windows to Excel for Windows
Article ID: Q75089

The Knowledge Base can be downloaded from
ftp://ftp.sn.no/user/balchen/vb/kb/vbkb_ft.exe

MS has it too, allthough I don't know where. It used to be in
ftp://ftp.microsoft.com/KBHelp/vbkb_ft.exe

Jens

Jens
--
* Everything I said are the opinions of someone else.   *
* I just cut-and-pasted.                                *

Jens Balchen jr.       http://www.sn.no/~balchen



Tue, 07 Jul 1998 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. help in VB coding: solving math equations, or find OCX that's equation solver

2. Using the Excel Trend Function from within VB

3. Vb - Excel with excel formulas

4. RTF math equation/formula

5. Help: Need to solve a SECOND DEGREE equation in VB

6. Help: how to solve a SECOND DEGREE equation in VB

7. Excel Formula in VB

8. Use Excel Formula in VB

9. VB.Net 2002 Excel Spreadsheet and Formulas

10. Formulas in Excel VB

11. Excel formula in VB

12. Excel formula in VB

 

 
Powered by phpBB® Forum Software