Hi,
I'm trying to use the code below in a macro to open a folder in an explorer window, but as the folder i'm trying to open has spaces in it's name (i.e. S:\My Work File) it won't work...I get the error message "The path does not exist or is not a directory". :
retval = Shell("explorer.exe s:\My Work File", vbNormalFocus)
If I remove the spaces (i.e. S:\MyWorkFile) it works.
However, the folder is a centrally used one in my company and canot be renamed as it will affect loads of other peoples spreadsheets.
Any ideas how I can get this to work without changing the folder name?
Thanks.
I'm trying to use the code below in a macro to open a folder in an explorer window, but as the folder i'm trying to open has spaces in it's name (i.e. S:\My Work File) it won't work...I get the error message "The path does not exist or is not a directory". :
retval = Shell("explorer.exe s:\My Work File", vbNormalFocus)
If I remove the spaces (i.e. S:\MyWorkFile) it works.
However, the folder is a centrally used one in my company and canot be renamed as it will affect loads of other peoples spreadsheets.
Any ideas how I can get this to work without changing the folder name?
Thanks.