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

Hi Dana
I just tried your suggestion and no luck :(
VB doesn't understand what SOLVER is and gives me the error message
"Compile error: Can't find project or library"

I have now found a workaround, which isn't elegant but seems to work. I
open the workbook programmatically from my vb6 app
and then I execute SolverInstall. I then save the workbook and close
it. I then reopen the workbook and execute SolverAutoOpen
and run SolverOK and SolverSolve.

The key here is that I rebuilding the reference to Solver, saving the
workbook and closing it, then reopening it to run solver. I don't know
how else to do guarantee that solver is loaded.
Any input from you and Tom appreciated.

Thanks
Andrew