LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel Solver Programming Error

I have a problem with programming Excel solver using vba. I have the
following micro in a workbook named "Book2.xls":

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 11/8/2005'
SolverOk SetCell:="$H$10", MaxMinVal:=2, ValueOf:="0", ByChange:="$G$10"
SolverAdd CellRef:="$G$10", Relation:=3, FormulaText:="$G$11"
SolverOk SetCell:="$H$10", MaxMinVal:=2, ValueOf:="0", ByChange:="$G$10"
SolverSolve userfinish:=True
End Sub

Macro1 runs fine if I open "Book2.xls" manually and either run it through
"Tools\Macro\Macros...\Macro1 - Run " or run it in the VB editor.

I then created another workbook named "Test.xls" with the following code.

Private Sub Workbook_Open()
Workbooks.Open Filename:="C:\test\Book2.xls"
End Sub

With this code, I can open "Test.xls" manually, which then automatically
opens "Book2.xls". But when I try to run Macro2 inside "Book2.xls" (either
through "Tools\Macro\Macros...\Macro1 - Run " or in the VB editor), the
Solver gives me an error "Solver: An unexpected internal error occurred, or
available memory was exhausted".

Does someone have any idea of how to fix this problem?

My original intent was to launch an Excel Workbook from within Microsoft
Access and automatically run the Excel solver with the data exported from
Access (since Access does not have the solver feature). I was given the same
error by the solver when I tried to do so.




 
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
Linear Programming via Excel Solver Squadron Excel Discussion (Misc queries) 1 December 5th 08 04:48 PM
Binary integer non-linear programming excel solver Gary[_3_] Excel Discussion (Misc queries) 0 September 12th 08 07:38 PM
Binary integer non-linear programming excel solver Gary[_3_] Excel Worksheet Functions 0 September 12th 08 07:35 PM
Binary integer non-linear programming excel solver premium Gary[_3_] Excel Worksheet Functions 0 September 10th 08 06:46 PM
Solver and Excel programming problem AAB Excel Programming 0 February 3rd 04 12:57 AM


All times are GMT +1. The time now is 11:30 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"