Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Shell command ignores parameters

Hello to all Excel fundiesRecently (8th February) I asked the question shown
below. However, I received no responses. (It is possible that I missed the
response(s))Is it possibly because the question was rather vague or is the
jury still 'out to lunch' on this one?"Hi all

I wrote an Excel VBA program to run (Shells to) a DOS program (not mine)
which deals bridge hands called "Big Deal"
It takes certain parameters such as the number of hands required, the name
of the output file and the type (e.g. CSV)

This all worked perfectly under Excel 2000 (Windows 98)
I have now converted/upgraded to Windows XP Home and Excel 2003 and have now
found that the parameters (NoOfHands and Hands, etc) are ignored and have
to be (re)typed at run time

Why is this? Has there been a change in the Shell command under Windows XP
or is the problem with Excel 2003?

The lines I use (which worked under the old setup) are list below:

Dim NoOfHands As Integer
(Note: the input control routine for NoOfHands has, for brevity, been
omitted)
Program = "C:\Simultaneous Tournament\Unlimited\Bigdeal\bigdeal -n " &
NoOfHands & " -p Hands -f csv"
TaskID = Shell(Program, vbNormalFocus)

Peter Bircher
South Africa"


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default Shell command ignores parameters

With no testing at all:

maybe wrap your program name in double quotes:

TaskID = Shell(chr(34) & Program & chr(34), vbNormalFocus)

If I were testing this, I'd either shell to DOS and try to get it working
there--then match that syntax or do the same thing via Windows start button|Run
dialog.



Pete wrote:

Hello to all Excel fundiesRecently (8th February) I asked the question shown
below. However, I received no responses. (It is possible that I missed the
response(s))Is it possibly because the question was rather vague or is the
jury still 'out to lunch' on this one?"Hi all

I wrote an Excel VBA program to run (Shells to) a DOS program (not mine)
which deals bridge hands called "Big Deal"
It takes certain parameters such as the number of hands required, the name
of the output file and the type (e.g. CSV)

This all worked perfectly under Excel 2000 (Windows 98)
I have now converted/upgraded to Windows XP Home and Excel 2003 and have now
found that the parameters (NoOfHands and Hands, etc) are ignored and have
to be (re)typed at run time

Why is this? Has there been a change in the Shell command under Windows XP
or is the problem with Excel 2003?

The lines I use (which worked under the old setup) are list below:

Dim NoOfHands As Integer
(Note: the input control routine for NoOfHands has, for brevity, been
omitted)
Program = "C:\Simultaneous Tournament\Unlimited\Bigdeal\bigdeal -n " &
NoOfHands & " -p Hands -f csv"
TaskID = Shell(Program, vbNormalFocus)

Peter Bircher
South Africa"


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Shell command ignores parameters

Thanks Dave
Will try that.
Peter Bircher

"Dave Peterson" wrote in message
...
With no testing at all:

maybe wrap your program name in double quotes:

TaskID = Shell(chr(34) & Program & chr(34), vbNormalFocus)

If I were testing this, I'd either shell to DOS and try to get it working
there--then match that syntax or do the same thing via Windows start

button|Run
dialog.



Pete wrote:

Hello to all Excel fundiesRecently (8th February) I asked the question

shown
below. However, I received no responses. (It is possible that I missed

the
response(s))Is it possibly because the question was rather vague or is

the
jury still 'out to lunch' on this one?"Hi all

I wrote an Excel VBA program to run (Shells to) a DOS program (not mine)
which deals bridge hands called "Big Deal"
It takes certain parameters such as the number of hands required, the

name
of the output file and the type (e.g. CSV)

This all worked perfectly under Excel 2000 (Windows 98)
I have now converted/upgraded to Windows XP Home and Excel 2003 and have

now
found that the parameters (NoOfHands and Hands, etc) are ignored and

have
to be (re)typed at run time

Why is this? Has there been a change in the Shell command under Windows

XP
or is the problem with Excel 2003?

The lines I use (which worked under the old setup) are list below:

Dim NoOfHands As Integer
(Note: the input control routine for NoOfHands has, for brevity, been
omitted)
Program = "C:\Simultaneous Tournament\Unlimited\Bigdeal\bigdeal -n " &
NoOfHands & " -p Hands -f csv"
TaskID = Shell(Program, vbNormalFocus)

Peter Bircher
South Africa"


--

Dave Peterson



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
Shell command ignores parameters Pete[_22_] Excel Programming 0 February 8th 05 04:39 PM
Shell Command JOHN Excel Programming 1 November 17th 04 10:39 AM
Shell command MAx Excel Programming 2 June 4th 04 04:11 PM
xp shell command using vba Sudhendra Excel Programming 2 February 16th 04 05:56 AM
SHELL command Robin Clay[_3_] Excel Programming 3 October 17th 03 02:50 PM


All times are GMT +1. The time now is 05:51 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"