Solver Reset in Excel 2007

TransMogrifier

New Member
Joined
Jan 14, 2011
Messages
18
Hi All

I have written a code in VBA for which the solver has to reset for the counter (in this case 10) mentioned. However in Excel 2007 when I try running the code it gets stuck on Solver Reset. The code worked without any issues on 2003.......any possible solutions......all the tool packs have been enabled.........
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Hi Kavy,

I tried using xlam ....... however it got stuck again.......... to get a better idea here is the code ;

Public Sub SolverOptimization()
Dim i As Integer
Sheets("roughcalc").Activate
For i = 1 To 9
Application.Run "solver.xlam!solverreset"
Application.Run "solver.xlam!SolverOk", SetCell:="a134", MaxMinVal:=2, ByChange:="c134:g134"
Application.Run "solver.xlam!SolverAdd", CellRef:="h134", Relation:=2, FormulaText:="1.0000000000001"
Application.Run "solver.xlam!SolverAdd", CellRef:="b134", Relation:=2, FormulaText:=0.0037 * i + Range("b145").Value
'SolverOk SetCell:="a134", MaxMinVal:=2, ValueOf:="0", ByChange:="c134:g134"
Application.Run "solver.xlam!SolverSolve", userfinish:=True
Range("A134:H134").Select
Selection.Copy
Range("A145").Offset(i, 0).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Next i
Sheets("roughcalc").Visible = False
Sheets("optimization").Activate
Call SolverValues
End Sub


Thanks
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,292
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top