Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Solver32.dll missing
Greetings,
I developed a set of solver equations and used the follwoing code to fire them up for re-analysis. I set all the values using solver itself in the worksheets and was just using the code to reactivate the equations after I changes some data. However after I ran the code and I wanted to double check a couple of things. So when trying to view the solver equation in the worksheet I recived a messge that effectively said "Solver32.dll is missing and its needs to be reinstalled via the CD" I was wondering if this was caused by my poor coding ability when trying to set a reference and if so how can I advoid this. As the code appears to still work yet I can't get it to fire manually when I'm in a spreadsheet. thanks is advance The code used is Private Sub RunModel_Click() Dim x As Integer Dim Catch As String Dim wb As Workbook MsgBox "Updating Catchment Data" Call Load_Catch_Data MsgBox "Finished Updating" On Error Resume Next ' Adapted from Dana DeLouise's article ' 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 MsgBox "Running solver. Please wait" For x = 1 To 20 Catch = "Catch" & x With Worksheets(Catch) ..Activate solverok solversolve userfinish:=True solverfinish keepfinal:=1 End With Next x MsgBox "Finished running solver. Heading to results" End sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Solver32.dll missing
If you use solver directly from excel the solver32.dll file is certanly not
missing in you system. To call it programmatically from VBA you need to have a reference to the file (which is not set by default). In VBA select the "tools" -"references" menu and activate the reference to solver. If it is not in the list browse your way to somthing like .....\program files\Microsoft Office\Office\Library\Solver\Solver32.dll regard Kristoffer "David Adamson" wrote: Greetings, I developed a set of solver equations and used the follwoing code to fire them up for re-analysis. I set all the values using solver itself in the worksheets and was just using the code to reactivate the equations after I changes some data. However after I ran the code and I wanted to double check a couple of things. So when trying to view the solver equation in the worksheet I recived a messge that effectively said "Solver32.dll is missing and its needs to be reinstalled via the CD" I was wondering if this was caused by my poor coding ability when trying to set a reference and if so how can I advoid this. As the code appears to still work yet I can't get it to fire manually when I'm in a spreadsheet. thanks is advance The code used is Private Sub RunModel_Click() Dim x As Integer Dim Catch As String Dim wb As Workbook MsgBox "Updating Catchment Data" Call Load_Catch_Data MsgBox "Finished Updating" On Error Resume Next ' Adapted from Dana DeLouise's article ' 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 MsgBox "Running solver. Please wait" For x = 1 To 20 Catch = "Catch" & x With Worksheets(Catch) ..Activate solverok solversolve userfinish:=True solverfinish keepfinal:=1 End With Next x MsgBox "Finished running solver. Heading to results" End sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
SOLVER32 GO AWAY | Excel Worksheet Functions | |||
Solver32.dll is unavailable... how do i get it to work | Excel Discussion (Misc queries) | |||
Toolbars Missing, And option to Add Missing | Excel Discussion (Misc queries) | |||
I'm missing something here.... | Excel Programming | |||
Solver32.dll unavailable error, use excel setup to reinstall | Excel Programming |