ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   SolverOK / SolvOK function does not compile - SOLVER library is referenced (https://www.excelbanter.com/excel-programming/371452-solverok-solvok-function-does-not-compile-solver-library-referenced.html)

Joel Lack

SolverOK / SolvOK function does not compile - SOLVER library is referenced
 
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


Joel Lack

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

Has this issue been further discussed? Is there a work around?


Does anyone have any comments on this?



All times are GMT +1. The time now is 11:00 AM.

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