Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
External function call
I'm haing a problem calling an external DOS app in certain
version of Windows. I've written a macro which calls a .bat file. The relevant code is: varPuttyUpload = Shell("c:\opt_mist1 \ssh\mist1_mist1upload.bat", 0) AppActivate varPuttyUpload It runs fine on a Win98 box but I run into problems on a Win2000Pro or XP box. Changing the parameter from 0 to 1 has no effect. Any suggestions? thanks kevin |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
External function call
Does the DOS app remain running after executing the Shell statement, or does
the batch file terminate automatically upon exit ("Close on exit" checkbox is checked on the Programs tab in the Properties dialog box for the BAT file). You may not need the AppActivate statement. Also, try different values for the second parameter in the Shell statement. 0 is vbHide, which will hide the batch file window. In some of my tests, this would cause an error, depending on what the batch file contained (I am running Windows ME and Excel 2000, SP-3). If the batch file terminates and closes the window by itself, then there is nothing for the AppActivate statement to do. Try single stepping through this code and watch what happens. -- Regards, Bill "Kevin" wrote in message ... I'm haing a problem calling an external DOS app in certain version of Windows. I've written a macro which calls a .bat file. The relevant code is: varPuttyUpload = Shell("c:\opt_mist1 \ssh\mist1_mist1upload.bat", 0) AppActivate varPuttyUpload It runs fine on a Win98 box but I run into problems on a Win2000Pro or XP box. Changing the parameter from 0 to 1 has no effect. Any suggestions? thanks kevin |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
call external function | Excel Worksheet Functions | |||
Is there a do not call function? | Excel Discussion (Misc queries) | |||
how to call a reference to a cell in external file | Excel Worksheet Functions | |||
Making a Call to an external sheet using a variable... | Excel Worksheet Functions | |||
call function | Excel Programming |