Title: VBA & glpsol

Hi,

I wrote already yesterday an email, but now I can give some mor details about my problem. What I want to do: Call the gplsol-Solver from Visual Basic. Therefor I have the shell-function in visual Basic. It looks like this:

Sub Modell(Model)

Dim Test

Verzeichnis = "C:\Programme\GnuWin32\bin\"


Dim Solver, Check As String

Solver = _

"C:\Programme\GnuWin32\bin\glpsol.exe" _

& " --model " & Model & ".mod" _

& " --data " & Model & ".txt" _

& " --output " & Model & ".sol"

Test = Solver

Shell Solver, vbMaximizedFocus

ShellWait (Solver)

End Sub


But it doesn´t work. To explain_ ShellWait just assures that Vba waits until the application (e.g.solver) is finished. In this function the shell-function is called. And this function is for sure right because I used it with other programms before. The solver is called, but the model, data are not solved, and there is no solution file generated. I assume that it depends on the argumentsmodel anddata and-output.

Because for example calling with the ShellFunction the help worksà shell "C:\Programme\GnuWin32\bin\glpsol.exe --help"

Please can anybody help me!

Vania






_______________________________________________
Help-glpk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-glpk

Reply via email to