Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Filename\Path Limitations

Status
Not open for further replies.

CPaul123

IS-IT--Management
Apr 18, 2002
94
US
I am trying to save an excel spreadsheet on a network drive (that has plenty of space). However I get the following error message:

Microsoft Office Excel cannot access the file 'Z:\South Plainfileds'. There are several possible reasons:

*The file name or path does not exist.
*The file is being used by another program.
*The workbook you are trying to save has the same name as a currently open workbook.

What I did as a workaround was to create subfolders under this South Plainfields folder and I was able to save the file. Does anyone know if there are any limitations to the length of the file name and/or path?

Thanks!
 
Do you have Write access to Z?

[tt]_____
[blue]-John[/blue][/tt]

Help us help you. Please read FAQ181-2886 before posting.
 
Yes...Like I stated...I created subfolders under Z:\South Plainfields\Excel and was able to then save any changes that I had made to the files.
 
well that would indicate that it was not the name of the folder causing an issue as it is used to get to the subfolders - sorry but I think John is right here - I have had that error when I didn't have full permissions on the folder

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
I am thinking whether you got the filepath name correct!

FilePath = "Z:\South"
FileName = "Book1.xls"
Workbooks.Open Filename:=FilePath & FileName

The above script will fail because there should be another \ before the filename, i.e.

FilePath = "Z:\South\"
FileName = "Book1.xls"
Workbooks.Open Filename:=FilePath & FileName

xlStar [glasses]
 
Does the length of your filepath + filename exceed 255 characters?

Regards
Ken.............

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]
----------------------------------------------------------------------------
 
I've had the same problem cpaul123 is having. Here was my situation:

Open a file off of a network share -- file opens normally.

Save the file to the same location -- get the error cpaul123 sees.

Save the file to another location (Save As...), i.e. desktop -- saves with no problems.

The user has full permissions on the network share in question, and could make new folders or files outside of any Office applications.

Also, trying to save a new file in the network share fails. BUT - the user can save a new file in a subdirectory of the network share.

I checked the 255 character length but it didn't pan out. (Although I'm not sure if spaces count as one character or more than one). I was able to narrow it down to an Office issue, then I got laid off...
 

Not much help I'm afraid, but I have had odd problems of this nature when the client and the server are running different versions of Windows. I can't remember the exact details and I never solved it.

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at VBAExpress[
 
This is weird...I just moved all of the files that I had previously put into folders back under the directory of South Plainfields and I was able to save the file in its original directory. I didn't make any changes to the access.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top