Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Shell
I am using the "Shell" comand from Excel to open different files. This works
fine until the path contains a space. for instance, the following line Shell "start " & pName & "\test.htm" WORKS when pName = "C:\Active\pictures\html\clifton" FAILS when pName = "C:\Active\pictures\html\alton on tees" i.e. when the path contains a space an error is thrown! Any Suggestions! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Shell
Hi Stuart,
If you surround the file and path name (but not the command) in double quotes it should work whether or not there are embedded spaces, e.g.: Shell "start """ & pName & "\test.htm""" -- Rob Bovey, Excel MVP Application Professionals http://www.appspro.com/ * Take your Excel development skills to the next level. * Professional Excel Development http://www.appspro.com/Books/Books.htm "Stuart" wrote in message ... I am using the "Shell" comand from Excel to open different files. This works fine until the path contains a space. for instance, the following line Shell "start " & pName & "\test.htm" WORKS when pName = "C:\Active\pictures\html\clifton" FAILS when pName = "C:\Active\pictures\html\alton on tees" i.e. when the path contains a space an error is thrown! Any Suggestions! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Shell Method | Excel Programming | |||
VBE COM Add-in Shell | Excel Programming | |||
trying to put a check box in each shell with vba | Excel Programming | |||
Shell function | Excel Programming | |||
Shell | Excel Programming |