ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   starting Solver with VBA (https://www.excelbanter.com/excel-programming/387805-starting-solver-vba.html)

Smallweed

starting Solver with VBA
 
I just need to start Solver with code, i.e. the equivalent to clicking Tools,
Solver (which remembers all parameters from the last time Solver was used on
the active sheet)? Any ideas?

merjet

starting Solver with VBA
 
Turn on the macro recorder (Tools menu), use Solver manually, turn off
the recorder. The code will be in the VB Editor. Check Solver using
the menu Tools | References in the VB Editor.

Hth,
Merjet



Smallweed

starting Solver with VBA
 
That works if I actually do some solving with Solver but it doesn't record
code just to display the dialog box - which is all I want it to do.

"merjet" wrote:

Turn on the macro recorder (Tools menu), use Solver manually, turn off
the recorder. The code will be in the VB Editor. Check Solver using
the menu Tools | References in the VB Editor.

Hth,
Merjet




Dana DeLouis

starting Solver with VBA
 
Hi.

Sub Solver_Show()
SOLVER.Main
End Sub

--
HTH :)
Dana DeLouis
Windows XP & Office 2007


"Smallweed" wrote in message
...
That works if I actually do some solving with Solver but it doesn't record
code just to display the dialog box - which is all I want it to do.

"merjet" wrote:

Turn on the macro recorder (Tools menu), use Solver manually, turn off
the recorder. The code will be in the VB Editor. Check Solver using
the menu Tools | References in the VB Editor.

Hth,
Merjet






Smallweed

starting Solver with VBA
 
Thanks very much Dana - just what I needed.

(in case anyone else nees this, you have to tick Solver in Tools, References
in the VB Editor first)

"Dana DeLouis" wrote:

Hi.

Sub Solver_Show()
SOLVER.Main
End Sub

--
HTH :)
Dana DeLouis
Windows XP & Office 2007


"Smallweed" wrote in message
...
That works if I actually do some solving with Solver but it doesn't record
code just to display the dialog box - which is all I want it to do.

"merjet" wrote:

Turn on the macro recorder (Tools menu), use Solver manually, turn off
the recorder. The code will be in the VB Editor. Check Solver using
the menu Tools | References in the VB Editor.

Hth,
Merjet








All times are GMT +1. The time now is 09:04 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com