Directory & File names with spaces - brackets usage

  • Thread starter Thread starter JDB
  • Start date Start date
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
 
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.
 
Back
Top