help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-glpk] VBA & glpsol


From: Vania Neugebauer
Subject: [Help-glpk] VBA & glpsol
Date: Wed, 19 Oct 2005 14:28:33 +0200

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







reply via email to

[Prev in Thread] Current Thread [Next in Thread]