Microsoft KB Archive/236543

= MOD2000: Code Librarian: Cannot Drag Code from One Category to Another =

Article ID: 236543

Article Last Modified on 7/31/2001

-

APPLIES TO


 * Microsoft Office 2000 Developer Edition

-



This article was previously published under Q236543





Moderate: Requires basic macro, coding, and interoperability skills.



SYMPTOMS
When you try to drag a Code Snippet, a Function, a Module, or a Class Module to a different category in a Code Library, the code is not moved or copied, but the category that the code resides in is moved to be a subcategory under the category that you are trying to drag your code into.



RESOLUTION
You can use the Settings tab of the Code Snippet, Function, Module, or Class Module to change or add category associations to a code element in the Code Librarian. To do so, follow these steps:  Select the code element that you want to change, and on the Code menu, click Modify. Click the Settings tab. To add an additional category association for the element:  Click the Add button next to the Categories list. In the Add Categories dialog box, select the category that you want to add an association to, and then click Add.

NOTE: If the category that you want to use does not exist, click New to create a new category.</ol> </li> To remove a category association for the element: <ol style="list-style-type: lower-alpha;"> In the Categories list, click to select the category that you want to remove.</li> Click the Remove button next to the Categories list.</li></ol> </li> When you finish changing the category associations, click OK to return to the main window.</li></ol>

<div class="status_section">

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

<div class="moreinformation_section">

Steps to Reproduce Behavior
<ol> In any Microsoft Office 2000 program, press ALT+F11 to switch to the Visual Basic Editor.</li> On the Add-Ins menu, click Code Librarian.</li> On the File menu, click New and create a new file named Test.mdb.</li> Right-click the Code Library icon and click New.</li> Type Category1 in the Name text box and click Add.</li> Type Category2 in the Name text box, click Add, and then click Close.</li> Under Contents, click Category2.</li> Right-click in the Code window, and then click New on the shortcut menu.</li> On the Code tab, type Test Routine in the Name text box.</li>  Type the following text in the Code window: Sub procTest MsgBox "Hello World" End Sub </li> Click OK.</li> Drag Test Routine from the Code window to Category1 in the Contents window.

Note that Category2 is now a subcategory of Category1. Furthermore, the code has not been moved or has not been copied to Category1.</li></ol>

Additional query words: pra

Keywords: kbbug kbcodelibrarian kbpending KB236543

-

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

© Microsoft Corporation. All rights reserved.