#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,071
Default VB solver

AFAIK, it would be illegal for you to distribute the solver files
yourself. If the recipient has the product installed, the code below
should work. It has been tested *very* lightly. It also assumes the
necessary security permissions are available. Obviously, it would
benefit from additional code to respond gracefully to the absence of
Solver.

Sub testSolverRef()
On Error Resume Next
ThisWorkbook.VBProject.References.Remove _
ThisWorkbook.VBProject.References("Solver")
ThisWorkbook.VBProject.References.AddFromFile _
Application.AddIns("Solver Add-in").FullName
On Error GoTo 0
End Sub

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...
What can be done to make a VB solver invoked routine work across versions of
Excel? Currently the VB code that I write in an Excel 2000 app will not fly
when I open the sheet in Excel 2002 nor will a 2002 app fly when brought over
to a 2000 excel installation (the VB code however is the same). I realize
that the solver file and probably the solver.dll being used by these 2
versions is different, but how can I get around this without distributing a
solver.xla and solver.dll file to force into some other user's machine with
every app. I send?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
I need to know how to use the solver MS EUDORA Excel Worksheet Functions 1 April 11th 09 03:23 AM
Interesting Solver problem (Solver encounters an error) MrShorty Excel Discussion (Misc queries) 3 December 22nd 05 10:52 PM
"solver" tb Excel Discussion (Misc queries) 1 September 12th 05 01:19 AM
Can solver do this? chrisrowe_cr Excel Worksheet Functions 2 July 14th 05 06:03 PM
Resetting Solver Manually to Fix Solver Bug Stratuser Excel Programming 0 September 13th 04 07:04 PM


All times are GMT +1. The time now is 07:39 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"