help-glpk
[Top][All Lists]
Advanced

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

RE: [Help-glpk] Problem on running a glpsol .bat file from VBA


From: Cheng,Jen-Min
Subject: RE: [Help-glpk] Problem on running a glpsol .bat file from VBA
Date: Thu, 9 Sep 2010 14:14:45 -0700

Shell will return to VBA before the command is actually completed.
I think some use apiShellExecute in shell32.dll to avoid this issue.


-----Original Message-----
From: address@hidden [mailto:address@hidden On Behalf Of JoaoFlavio
Sent: Thursday, September 09, 2010 1:50 PM
To: address@hidden
Subject: [Help-glpk] Problem on running a glpsol .bat file from VBA


I'm trying to run a .bat file from VBA.
It runs with any application, but not with glpsol.

The code is below: 

Sub Run_Glpk()
    Dim Address As String
    Dim Comando As Variant
    Dim Result As Variant
        
    Address = "C:\Solver\SNP_48\"
    Comand = Address & "roda.bat"
    
    Result = Shell(Comand, vbMinimizedFocus)
    
End Sub

I attach a file (  http://old.nabble.com/file/p29671298/run_glpk.xlsm
run_glpk.xlsm  ) with another module (modShellAndWaitSimple) with almost the
same objective.
(One line added)

Can anybody help me?

Thanks,

João Flávio



-----
João Flávio de Freitas Almeida

-- 
View this message in context: 
http://old.nabble.com/Problem-on-running-a-glpsol-.bat-file-from-VBA-tp29671298p29671298.html
Sent from the Gnu - GLPK - Help mailing list archive at Nabble.com.


_______________________________________________
Help-glpk mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/help-glpk

reply via email to

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