By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,932 Members | 1,511 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,932 IT Pros & Developers. It's quick & easy.

shell command not working

P: n/a
Hi all,

I have this shell syntax and its higlighted in red in vba editor. I
don't think i got it fully right. Could someone take a look for me

Shell("c:\program files\IrfanView\i_view32.exe" "c:\*.tif /convert=
d:\temp\*.jpg")
cheers

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Farouq Din wrote:
Hi all,

I have this shell syntax and its higlighted in red in vba editor. I
don't think i got it fully right. Could someone take a look for me

Shell("c:\program files\IrfanView\i_view32.exe" "c:\*.tif /convert=
d:\temp\*.jpg")


Perhaps ...

Shell("c:\program files\IrfanView\i_view32.exe c:\*.tif
/convert=d:\temp\*.jpg")

or

Shell "c:\program files\IrfanView\i_view32.exe c:\*.tif
/convert=d:\temp\*.jpg"
Nov 13 '05 #2

P: n/a
On 21 Feb 2005 09:26:23 -0600, Farouq Din <fa*******@hotmail.com>
wrote:

Shell expects a single string. You are giving it two.
You were probably trying to wrap a path with special chars (such as
space) with double-quotes. It's probably easier to concatenate with
Chr$(34) instead:
strCommandLine = Chr$(34) & "c:\program files\IrfanView\i_view32.exe"
& Chr$(34)
etcetera
Shell strCommandLine

-Tom.
Hi all,

I have this shell syntax and its higlighted in red in vba editor. I
don't think i got it fully right. Could someone take a look for me

Shell("c:\program files\IrfanView\i_view32.exe" "c:\*.tif /convert=
d:\temp\*.jpg")
cheers

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.