Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default XL 2003: Problem running Solver from VBA

Group:

I get the following error message when I try to run Solver from VBA code:

"Solver: An unexpected internal error occurred, or available memory was
exhausted."

I am running Excel 2003 SP2 and Windows XP Professional on a network
installation.

Here is the simple code that I am trying to run:

Sub SolveEquation()
Application.Run "Solver.xla!Auto_Open"
SolverReset
SolverOk MaxMinVal:=1, ValueOf:="0", ByChange:="$D$7:$D$8"
SolverAdd CellRef:="$A$7:$A$8", Relation:=2, FormulaText:="$B$7:$B$8"
SolverSolve userFinish:=True
End Sub

The error occurrs on the third line of the code that begins with "SolverOk
MaxMinVal:=1..."

Any help would be greatly appreciated. (I called Microsoft after viewing
their KB article regarding the problem in Excel 2000, but they were of no
help at all. I guess they have no fix for this in Excel 2003.)

Thanks,
Bob V


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default XL 2003: Problem running Solver from VBA

Just a thought, and I don't know if it will help, but did you try reversing
the order of the SolverAdd and SolverOk commands?

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Robert Valentine" wrote in message
et...
Group:

I get the following error message when I try to run Solver from VBA code:

"Solver: An unexpected internal error occurred, or available memory was
exhausted."

I am running Excel 2003 SP2 and Windows XP Professional on a network
installation.

Here is the simple code that I am trying to run:

Sub SolveEquation()
Application.Run "Solver.xla!Auto_Open"
SolverReset
SolverOk MaxMinVal:=1, ValueOf:="0", ByChange:="$D$7:$D$8"
SolverAdd CellRef:="$A$7:$A$8", Relation:=2, FormulaText:="$B$7:$B$8"
SolverSolve userFinish:=True
End Sub

The error occurrs on the third line of the code that begins with "SolverOk
MaxMinVal:=1..."

Any help would be greatly appreciated. (I called Microsoft after viewing
their KB article regarding the problem in Excel 2000, but they were of no
help at all. I guess they have no fix for this in Excel 2003.)

Thanks,
Bob V



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
Interesting Solver problem (Solver encounters an error) MrShorty Excel Discussion (Misc queries) 3 December 22nd 05 10:52 PM
I am running Excel 2003 from Office 2003 Professional Tillso Excel Discussion (Misc queries) 1 October 21st 05 03:27 PM
Problem Running Code in Excel 2003 Mark Excel Programming 1 June 17th 05 12:45 AM
Problems running Solver from VB: Windows 2000 users? karamelmu Excel Programming 3 February 26th 05 02:14 PM
Running Solver Add-In through VB ? Luqman Excel Programming 2 April 5th 04 06:54 PM


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