PRJ4: Qualifications of Application Library Not Pasted

Q113629


The information in this article applies to:

If you select a method or property from an application object library in the Object Browser and paste it into a code window, only the method or property will be pasted. The qualifications will not be pasted with the method or property. When you run the procedure that contains the pasted method or property, one of two errors will be generated: "Type mismatch" or "Qualifier must be collection."

The Object Browser does not paste any qualifications because it does not read any context information. The Object Browser doesn't know what appears immediately before the current insertion point in the code window. You are responsible for making sure that any necessary qualifications appear before the pasted text.

NOTE: This situation also applies to methods or properties pasted from the Microsoft Excel object library.

Steps to Reproduce Behavior

  1. From the Tools menu, choose Macros.


  2. Choose New, and choose Options.


  3. Select Store Macro in current Project file, and choose OK.


  4. Insert a blank line in the sub procedure and place the insertion point on the blank line.


  5. From View menu, choose Object Browser.


  6. Set Library/Projects to MSProject.


  7. Select the "Assignments" class and the "Application" property.


  8. Choose Paste. The word "Application" is pasted into the code window in the newly created procedure.


  9. Run the procedure.


Additional query words:

Keywords :
Issue type :
Technology : kbHWMAC kbOSMAC kbProjectSearch kbProject400Mac kbProjectMacSearch kbProject400


Last Reviewed: November 5, 2000
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.