dbTalk Databases Forums  

trouble with Call Shell

comp.database.ms-access comp.database.ms-access


Discuss trouble with Call Shell in the comp.database.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
GAKane
 
Posts: n/a

Default trouble with Call Shell - 02-08-2004 , 08:53 AM






Call Shell(explorer.exe & thePath, vbNormalFocus) opens the Windows folder
with pathname thePath.

My trouble is the folders I'm trying to open have a comma in their name, as:
thePath = "C:\My Documents\firstword, secondWord"

With that stinking comma in the path, Call Shell(explorer.exe & thePath,
vbNormalFocus) doesn't open the folder, it fails, and gives an alert: 'The
path 'secondWord' does not exist or is not a directory'.

Is there a fix? (There are thousands of folders, so taking the comma out of
the folder names isn't a practical option.)

GAKane


[oops I mistakenly posted this on someone else's thread. Sorry. Here it is
on it's own.]



Reply With Quote
  #2  
Old   
Bradley
 
Posts: n/a

Default Re: trouble with Call Shell - 02-08-2004 , 06:38 PM






Perhaps try putting in extra quotes around your path?

--
Bradley
Software Developer www.hrsystems.com.au
A Christian Response www.pastornet.net.au/response

"GAKane" <GAKane (AT) nospam (DOT) com> wrote

Quote:
Call Shell(explorer.exe & thePath, vbNormalFocus) opens the Windows
folder
with pathname thePath.

My trouble is the folders I'm trying to open have a comma in their name,
as:
thePath = "C:\My Documents\firstword, secondWord"

With that stinking comma in the path, Call Shell(explorer.exe & thePath,
vbNormalFocus) doesn't open the folder, it fails, and gives an alert: 'The
path 'secondWord' does not exist or is not a directory'.

Is there a fix? (There are thousands of folders, so taking the comma out
of
the folder names isn't a practical option.)

GAKane


[oops I mistakenly posted this on someone else's thread. Sorry. Here it
is
on it's own.]





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.