Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 838895 - Last Review: April 7, 2006 - Revision: 5.2
Error message when you try to save a workbook that was opened from a mapped drive location in Excel 2002
Important This article contains information about how to modify the registry. Make sure to back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base:
256986Â
(http://kbalertz.com/Feedback.aspx?kbNumber=256986/
)
Description of the Microsoft Windows registry
When you try to save a workbook that was opened from a
mapped drive (such as Z:\folder) location in Microsoft Office Excel 2003, you
may receive one of the following error messages:
'path\filename.xls'
cannot be accessed. The file may be read-only, or you may be trying to access a
read-only location. Or, the server the document is stored on may not be
responding.
Runtime error 1004: Cannot access
path\filename
This problem may occur if either of the following conditions
is true:
- On the File menu, you click Save
As, and then type a UNC path (such as \\server\share) in the
File name box to resave the file back to its original file
name and location.
- You programmatically save the file back to its original
file name and location by using a UNC path (such as \\server\share).
To work around this problem, do one of the following:
- On the File menu, click
Save.
Note Do not click Save As on the
File menu to resave the file back to its original file name
and location by using a UNC location. - Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.
Sub test()
ActiveWorkbook.SaveAs ActiveWorkbook.Path & "\filename.xls"
End Sub
How to obtain the hotfix
This issue is fixed in the Excel 2002 Hotfix Package that is dated May 6, 2004. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
829348Â
(http://kbalertz.com/Feedback.aspx?kbNumber=829348/
)
Excel 2002 post-Service Pack 3 hotfix package: May 6, 2004
Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall your operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.
To activate this hotfix, follow these steps:
- Quit Excel 2002.
- Click Start, click Run, type regedit in the Open box, and then click OK.
- Locate and then click to select the following registry key:
HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Excel\Options
- Point to New on the Edit menu, and then click DWORD Value.
- Type SupportUNCMappedDriveSaveAs, and then press ENTER.
- Right-click SupportUNCMappedDriveSaveAs, and then click Modify.
- In the Value data box, type 1, and then click OK.
- On the File menu, click Exit to quit Registry Editor.
Microsoft
has confirmed that this is a problem in the Microsoft products that are listed
in the "Applies to" section.
APPLIES TO
- Microsoft Excel 2002 Standard Edition
| kbqfe kbhotfixserver kbofficexppostsp3fix kbfix kbbug KB838895 |
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate