|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
I posted a previous thread which asked how to use the Solver add in included in excel in the VB6 environemnt in order to solve an equation with 3 unkowns. In short, I use solver to minimize the sum of the squares.
In thinking about the problem I think I can do this by openning an excel workbook in VB which has the solver included as a recorded macro. I would then dump my data onto the excel workbook and use a shortcut key to launch the solver macro. I am unsure if this will work or how to do this ==> Open an existing file and type the shortcut key in excel without the user being aware of it. Any suggestions would be appreciated. If you know how to call the solver add in in Excel from a VB6 application that would do as well. Thanks. |
|
#2
|
|||
|
|||
|
If you write the solver macro, you should be able to "call" the function from your code.
Code:
i.e. call SolverLaunchMacro
__________________
How can I soar like an eagle when I'm flying with turkey's? |
|
#3
|
|||
|
|||
|
Ole clarification
I have this macro saved in personal.xls which from my understanding is loaded in the background everytime excel is launched.
If I launch Excel via: PHP Code:
I am assuming I can run this Macro since it should be saved and loaded unto my current instance of Excel. How would I call it from my VB environment? ie Call objxl.Solver_Mac PHP Code:
Thank You Last edited by ofunkym : June 10th, 2003 at 08:01 AM. |
|
#4
|
|||
|
|||
|
OLE answer
Thanks for the help I was able to call the macro by saving it in personal.xls and using the line:
PHP Code:
All is well. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > OLE Automation Excel |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|