View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Dana DeLouis Dana DeLouis is offline
external usenet poster
 
Posts: 947
Default Referencing and loading Solver programatically - how?

SolverAutoOpen ' Calls your routine

Hi. Just a guess. Instead of calling you routine here, I'd be curious if
you just skipped it.
I think the AutoOpened flag has a bug left over from who knows how many
versions. I've never seen any code within Solver that calls it.
When Solver opens, it deletes a small internal sheet, and then rebuilds it,
and sets the flag.
( I don't think "If Not SOLVER.AutoOpened then" would ever be executed)
With vb6, I'd be curious to learn if you just set a reference to the correct
workbook, and than reset it again with Solver.Auto_open.

Sub SolveIt()
SolverInstall
SOLVER.Auto_open

As a side note, in a Min problem, value of 0 is ignored.
SolverOk SetCell:="$K$63", MaxMinVal:=2, ByChange:="$K$54:$K$61"

Again, I'd be curious for feedback. :)
--
HTH. :)
Dana DeLouis
Windows XP, Office 2003


"CodeMonkey" wrote in message
ups.com...
Tom,
that's exactly what I tried. I added the SolverInstall Sub to the
Workbook_Open event and it didn't help.

Any more ideas?

Cheers
Andrew