Microsoft KB Archive/234837

= MOD2000: Renamed Objects Lose Connection to Source Code Control =

Article ID: 234837

Article Last Modified on 5/2/2001

-

APPLIES TO


 * Microsoft Office 2000 Developer Edition
 * Microsoft Visual SourceSafe 6.0 Standard Edition

-



This article was previously published under Q234837





SYMPTOMS
After you rename an object that you have checked out by using the VBA Source Code Control Add-in, you receive the following error message:

457: This key is already associated with an element of this collection.

If you then try to check the object in, you receive the following message:

You do not have any files checked out from Source Code Control.

If you then refresh the Source Code Control (SCC) Status list, you see that the object is renamed, but also that it is removed from source code control.



RESOLUTION
To regain the Source Code Control connection, rename the object back to its original name.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.



Steps to Reproduce the Problem
 Install Microsoft Office 2000 Professional. Install Microsoft Visual SourceSafe 6.0, which is available on the Microsoft Office 2000 Developer CD. Open Visual SourceSafe Explorer, and then create a new SourceSafe database named test . Close Visual SourceSafe Explorer. Open Microsoft Excel 2000, and then save the current workbook as Book1.xls.</li> Open the Visual Basic Editor by pressing ALT+F11.</li> Click the Add-ins menu. If you do not have the VBA Visual Source Code Control add-in installed, you can load it by clicking Add-in Manager on the Add-ins menu, clicking VBA Source Code Control, and then clicking to select the Load/Unload check box.</li> Create a new project, and then save it.</li> On the Add-ins menu, click VBA Source Code Control, and then add the current project to Microsoft Visual SourceSafe.</li> Check out Sheet1.</li> In the Properties window, modify the (Name) property to rename Sheet1 to NewName. Note that after you enter the name, you receive the following message:

457: This key is already associated with an element of this collection.

</li> Click OK and try to check Sheet1 into Visual Source Safe. Note that you receive the following message:

You do not have any files checked out from Source Code Control.

</li> On the Add-ins menu, click VBA Source Code Control, and then click Refresh File Status. Note that the sheet is renamed to NewName and is no longer under Source Code Control.</li> However, if you then open the Visual SourceSafe Explorer, Sheet1 is still checked out and maintains the complete object history.

At this point, if you rename the NewName sheet to Sheet1, the connection to Source Code Control is restored.</li></ol>

Additional query words: pra

Keywords: kbbug kbpending KB234837

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.