SolverOK / SolvOK function does not compile - SOLVER library is referenced

J

Joel Lack

I want the solver function to automatically run when my worksheet is
activated. I initially recorded the process for convenience, but
received the "Compile error: Can't find project or library" message. I
checked my reference and discovered that I had not referenced SOLVER
yet in this project. But, the function still failed to compile after
adding the refernece.

I searched the groups for similar problems and found several threads on
the same situation, but only found one that suggested a bug in XP that
recorded the function name wrong as SolverOK but should be SolvOK.
However, neither of these are working for me. Has this issue been
further discussed? Is there a work around?

FYI:

I'm using Excel 2002 SP3

My code:

Private Sub Worksheet_Activate()

SolvOK SetCell:="$F$23", MaxMinVal:=2, ValueOf:="0",
ByChange:="$F$15"
SolverSolve

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top