Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Calling Solver from an Excel 2003 Macro

When I use Solver manually in my spreadsheet it works as
expected. When I call it from a macro, I get an VBA
error saying that a subroutine or function is not
referenced. When I go to Tools - References I can't
find Solver.XLA in the tick box list of Addins. Does
anyone know how to force Excel to update this list, to
include the Solver Addin?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Calling Solver from an Excel 2003 Macro

You have to go to the VBE and go to tools=references, find solver in the
list and click the box to select it.

http://support.microsoft.com/support...ver/solver.asp
Creating Visual Basic Macros that Use Microsoft Excel Solver

or to do it in VBA (post by Dana DeLouis)
http://groups.google.com/groups?thre...gp13 .phx.gbl

Sub SolverInstall()
'// Dana DeLouis
Dim wb As Workbook

On Error Resume Next
' Set a Reference to the workbook that will hold Solver
Set wb = ActiveWorkbook

With wb.VBProject.References
.Remove .Item("SOLVER")
End With

With AddIns("Solver Add-In")
.Installed = False
.Installed = True
wb.VBProject.References.AddFromFile .FullName
End With
End Sub


--
Regards,
Tom Ogilvy

"expatgr" wrote in message
...
When I use Solver manually in my spreadsheet it works as
expected. When I call it from a macro, I get an VBA
error saying that a subroutine or function is not
referenced. When I go to Tools - References I can't
find Solver.XLA in the tick box list of Addins. Does
anyone know how to force Excel to update this list, to
include the Solver Addin?



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
how do you use solver in excel 2003 Larry Orange Excel Discussion (Misc queries) 3 November 3rd 06 01:35 PM
Calling solver Oldgradgreg Excel Programming 0 April 6th 04 12:03 AM
Calling up the Solver function in a VBA macro Ken Wright Excel Programming 3 January 28th 04 04:21 PM
Calling Solver from VBA Nick Excel Programming 0 September 16th 03 03:24 PM
Calling the Solver via a subroutine James[_8_] Excel Programming 1 July 10th 03 01:08 AM


All times are GMT +1. The time now is 06:35 PM.

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"