Written by Allen Wyatt (last updated July 3, 2021)
This tip applies to Excel 97, 2000, 2002, and 2003
Kimani has noticed that links in his workbooks are automatically updated from UNC paths to the mapped drives of the user who opened the file. This causes problems because other users don't use the same drive mapping. If Excel didn't do the conversion, then those users would be able to use the links via the UNCs that were used when the workbook was created. Kimani wonders why Excel updates the links based on the local system drive mapping and how he can force it to use the original UNC paths.
The short answer is that there is no way to stop Excel from doing the link updating. This can be a real bother, too. Microsoft discusses the problem in the following Knowledge Base article:
http://support.microsoft.com/kb/328440
The Knowledge Base article indicates that if a workbook is opened from a mapped drive, and the UNC refers to that same drive, the UNC in the link is updated to the mapped drive designation. The article doesn't provide any solution to this problem, other than the implication that the user could open the workbook using a UNC instead of a mapped drive. For most organizations this isn't a real solution.
One approach is to not allow people to change the workbook. Make it read-only and force people to save their changes at a different location. This is a viable approach if the workbook serves as a way to distribute information where changes don't need to be available to others in the organization. If others need to see the changes, however, it isn't terribly viable.
The only possible approach we've run across is to do away with the direct UNC references and use the INDIRECT worksheet function to build your references. These would not be rewritten by Excel, but it does present other drawbacks. (For instance, the target workbook must be open in order for INDIRECT to fetch the linked information.)
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (7301) applies to Microsoft Excel 97, 2000, 2002, and 2003.
Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!
You can use Excel for all types of data processing. You may want to work with filenames in a worksheet, but the first ...
Discover MoreIf you have a problem that crops up when you first start Excel, it can be a bear to track down the cause of the problem. ...
Discover MoreTracking down a problem that occurs with a single workbook can be vexing. One such problem occurred with Chris, and these ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
2023-01-09 05:54:02
Peter
UNC paths is the worst, you can never chance servers. Drives is the way to go, and make sure drives are consistent.
2021-08-19 02:18:29
Roy
Excel opens such files via either method, UNC or mapped drive, by the user's choice. Once opened using a UNC location, it will not change UNC addresses. Once opened using a mapped drive, it WILL change them. When the user saves, the file keeps the addressing used. Even better, if opened via the UNC address, EVEN IF the user has an equivalent mapped drive that would have been the source of trouble if opened via such an address, Excel will maintain the UNC addressing: it will not change over to mapped drive addressing.
The key then is to ensure the users all open the file via UNC addressing so that things stay as they are. There's really only one solid way to achieve that. Force the user to open the file as desired, in this case via UNC addressing. Create a file with either a macro firing on opening that opens the target file using the UNC addressing. The addressing will not change and when he saves, it's still good. For good measure, put the file somewhere new so that no one has any lying excuse for opening it directly: they'll see where it is if they wish, and clearly could open it or the macro won't open it for them either. But no excuse that it "just somehow happened... don't know what to tell you man... you gotta up your game, I guess."
The devil in the details is what do you do when you use both kinds of addressing? And so do they? And of course, their drive mappings are all over the... map... So none work for anyone else. However you decide to force it to be opened, the other addressing will change and be saved.
Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments