Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 117
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
call external function DavidB Excel Worksheet Functions 2 March 16th 09 09:04 PM
Is there a do not call function? pokdbz Excel Discussion (Misc queries) 2 December 27th 07 04:00 PM
how to call a reference to a cell in external file jose Excel Worksheet Functions 2 February 27th 07 09:59 AM
Making a Call to an external sheet using a variable... [email protected] Excel Worksheet Functions 2 January 19th 07 03:19 PM
call function sirron Excel Programming 1 August 26th 03 03:39 PM


All times are GMT +1. The time now is 04:20 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"