Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
works on 2000, but not on XP
Hi all:
I'm in trouble finding why the following code works on 2000, but does not work on XP: --------------------------------------------------------------- Public Sub DoFortran1(Optional FakeArg As Integer) Dim Program, i Dim TaskID As Long Dim hProc As Long Dim lExitCode As Long ' Executing External Fortran Procedure with detecting process status ACCESS_TYPE = &H400 STILL_ACTIVE = &H103& Program = ThisWorkbook.Path & "\Lab_Sim.exe" 'On Error Resume Next TaskID = Shell(Program, 0) 'Launching Fortran program hProc = OpenProcess(ACCESS_TYPE, False, TaskID) 'Get the process handle If Err < 0 Then MsgBox "Cannot Start Fortran program " & Program, vbCritical, "Error" Exit Sub End If Do ' Looping to detect the program status to the end Call GetExitCodeProcess(hProc, lExitCode) DoEvents UpdateProgress Loop While lExitCode = STILL_ACTIVE MsgBox "Fortran based calculation completed" Unload Progress_FORTRAN End Sub ---------------------------------------------------------------------- It is a VBA coding in Excel to execute a custom program in FORTRAN called "Lab_Sim.exe". Anyone can tell me why this works on 2000, but not on XP?? Thanks in advance. TYP |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
MS Works Spreadsheet 2000 v5.0 VLOOKUP | Excel Worksheet Functions | |||
It works on 2000, but not on XP | Excel Programming | |||
Outlining works in XP not in 2000 | Excel Programming | |||
Macro works in 2000 not XP for Progress Bar | Excel Programming | |||
VBA Code works in 2000 not 97 | Excel Programming |