Directory & File names with spaces - brackets usage

J

JDB

Sorry, this is a re-post, the first did not show up after 8 hrs. will
try again.
--------------------------------------------------------------------------
I am trying to open an Excel file thru Access VBA and cannot open the
file.
The various directories on the path have spaces in them i.e. "My
Documents".

I understand by various posts that I might need to use brackets around
the path, but cannot seem to find the right combinations of brackets
and double quotes to be able to open/read the file.

Any pointers would be helpful.

Thanks
 
J

John W. Vinson

Sorry, this is a re-post, the first did not show up after 8 hrs. will
try again.
--------------------------------------------------------------------------
I am trying to open an Excel file thru Access VBA and cannot open the
file.
The various directories on the path have spaces in them i.e. "My
Documents".

I understand by various posts that I might need to use brackets around
the path, but cannot seem to find the right combinations of brackets
and double quotes to be able to open/read the file.

Any pointers would be helpful.

Thanks

Brackets won't help in this case; quotes will: e.g.

"C:\Documents and Settings\Username\My Documents\myspreadsheet.xls"

as a string value will point to the file.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top