Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Help needed with Solver macro

I am trying to use following macro, but the Excel stop executing in
after 20 rows and gives me a message: "Unexpected internal error
occured, or available memory is exhausted" I tried to run it without
macro and it works fine.

Can any1 help me with this?
Thank you


Private Sub CommandButton1_Click()

For i = 1 To 290
Application.ScreenUpdating = False


SolverOk SetCell:=Range("$it$4").Offset(i, 0), MaxMinVal:=2,
ValueOf:="0", ByChange:=Range("$hx$4:$hy$4").Offset(i, 0)
SolverAdd CellRef:=Range("$hx$4").Offset(i, 0), Relation:=3,
FormulaText:="0.0000001"
SolverAdd CellRef:=Range("$hy$4").Offset(i, 0), Relation:=3,
FormulaText:="0.0000001"

SolverSolve UserFinish:=True

SolverDelete CellRef:=Range("$hx$4").Offset(i, 0), Relation:=3,
FormulaText:="0.0000001"
SolverDelete CellRef:=Range("$hy$4").Offset(i, 0), Relation:=3,
FormulaText:="0.0000001"
Application.ScreenUpdating = True
Range("it1") = i

Next i

End Sub
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
Solver Macro [email protected] Excel Discussion (Misc queries) 2 August 24th 07 08:54 PM
solver related some financial knowledge may be needed Richard Payman Excel Discussion (Misc queries) 4 September 8th 05 02:37 PM
Help needed with Solver macro Al[_15_] Excel Programming 0 November 19th 04 01:45 AM
Macro for Solver Velero Excel Programming 2 February 19th 04 01:39 PM
Solver Macro Dick Stumbo Excel Programming 0 September 18th 03 01:55 AM


All times are GMT +1. The time now is 01:46 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"