Re: Excel 2002 Solver unexpected Error

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Tom (anonymous_at_discussions.microsoft.com)
Date: 06/16/04


Date: Tue, 15 Jun 2004 22:32:04 -0700


>-----Originalnachricht-----
>Hallo Tom,
> ^^^^bitte in der NG kompletten Namen verwenden
>
>> ich habe folgendes Phänomen.
>> Eine Kollege von mir hat ein Macro geschrieben, in
welchem
>> er die Solver AddIn verwendet.
>> Rufe ich das Excel-Sheet direkt auf und starte die
>> Berechnung läuft alles normal. Rufe ich das Sheet über
>> einen Link aus einem Word-Dokument auf, bekomme ich
>> folgende Fehlermeldung:
>>
>> Solver: unexpected internal error occures, or available
>> memory was exhausted.
>>
>> Der Fehler existiert erst seit der Umstellung auf Excel
>> 2002.
>
>Ist das Makro mit Passwort geschützt?
>Falls ja, wird's schwer...
>Falls nein: poste bitte mal die Code-Zeile die den Fehler
auslöst.
>
>Schönen Gruß
>--
>Michael
>michael.schueller@gmx.de
>

Hallo Michael,

danke für dein reply und sorry, dass ich erst jetzt wieder
antworte (Zeitmangel).

Das Macro selber ist nicht passwortgeschützt, aber das
Word-Dokument, welches den link enthält.

Hier ist die Zeile, die die Fehlermeldung verursacht.

SolverOk SetCell:="$H$56", MaxMinVal:=3, ValueOf:="0",
ByChange:="$G$56"

Weiter habe ich noch herausgefunden, dass, wenn ich nach
Aufruf des Links im nun offenen Excel-Sheet zuerst über
Extras den Solver aufrufe und gleich wieder schliesse, die
Fehlermeldung nicht auftritt.

Des weiteren funktioniert dies

Application.ExecuteExcel4Macro String:="SOLVER.XLA!
SOLVER.OK(!Z46S8;3;0;(!Z46S7))"
Application.ExecuteExcel4Macro String:="SOLVER.XLA!
SOLVER.LÖSEN(wahr)"

auch nicht mehr und wurde ersetzt durch

SolverOk SetCell:="$g$46", MaxMinVal:=3, ValueOf:="0",
ByChange:="$h$46"
SolverOk SetCell:="$h$46", MaxMinVal:=3, ValueOf:="0",
ByChange:="$g$46"
SolverSolve (True)

Vielleicht hilft es ja bei der Fehlersuche ;-)

Noch einmal danke im Voraus.

Gruss Tom



Relevant Pages

  • Re: Closing and reopening the same file
    ... Tom wrote: ... understood by me to mean that you wanted to know how I started "your macro". ... ' Reload the active document. ... Dim wkbk As Workbook ...
    (microsoft.public.excel.misc)
  • Re: Solver programming questions
    ... Recording a macro usually works. ... This allows you make sure you do not have any constraints that you are not aware of. ... Creating a macro by recording the use of Solver did not pickup the constraint statements. ... First problem is that the solver runs successfully on the first occasion the ...
    (microsoft.public.excel.programming)
  • Re: Solver programming questions
    ... "Dana DeLouis" wrote: ... Recording a macro usually works. ... This allows you make sure you do not have any constraints that you are ... recording the use of Solver did not pickup the constraint statements. ...
    (microsoft.public.excel.programming)
  • Re: Solver Function - Making it Automatic
    ... "Scenario" for Scenario Manager, and then put the Scenario Manager button on ... Solver doesn't work well with data spread out on other sheets. ... the macro I recorded performs about 16 "solver" ... spreadsheets that I don't particularly want to "see". ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Solver programming questions
    ... Thanks Dana, I omitted to put C1 in exclamation marks so that part works fine ... Can you help me code constraints in the macro please? ... recording the use of Solver did not pickup the constraint statements. ...
    (microsoft.public.excel.programming)