Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / December 2005

Tip: Looking for answers? Try searching our database.

Shell function has a path with embedded blanks

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Doug F. - 15 Dec 2005 00:25 GMT
I use the Shell function to zip a file. The directory path to the input file
contains embedded blanks in the name. I can't change the name. So, how can I
hard code this path? eg H:\"My directory"\ doesn't work. Thanks.

Signature

Doug F.

Branden Johnson - 15 Dec 2005 03:49 GMT
Try using Chr(34) in place of your double quotes like this:

strMyPath = "H:\" & Chr(34) & "My directory" & Chr(34) & "\"

Branden Johnson

> I use the Shell function to zip a file. The directory path to the input file
> contains embedded blanks in the name. I can't change the name. So, how can I
> hard code this path? eg H:\"My directory"\ doesn't work. Thanks.
>
> --
> Doug F.
Tom Lake - 15 Dec 2005 04:18 GMT
> Try using Chr(34) in place of your double quotes like this:
>
> strMyPath = "H:\" & Chr(34) & "My directory" & Chr(34) & "\"

The quotes should be around the entire path name rather than just the
directory name

Try

strMyPath = """H:\" & "My directory" & "\"""

Tom Lake
Doug F. - 15 Dec 2005 20:48 GMT
Thanks, I tried quotes around the entire path first, it works fine.
Signature

Doug F.

> > Try using Chr(34) in place of your double quotes like this:
> >
[quoted text clipped - 8 lines]
>
> Tom Lake
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.