BUG: Error Message "Object Does Not Support This Property ..." in Locals and Watch Window in Visual Basic 6.0

This article was previously published under Q258207
This article has been archived. It is offered "as is" and will no longer be updated.
SYMPTOMS
A multiuse class in an ActiveX DLL implements a public non-creatable class that has two properties. The class is instantiated in a Standard EXE, and values are assigned to the properties of the object just created. When the value of the form level object variable is examined in the locals window or a watch is set on it, Visual Basic 6.0 displays the following error message:
<Object does not support this property or method>
In Visual Basic 5.0, the values assigned to the properties are visible.
STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.
MORE INFORMATION

Steps to Reproduce Behavior

  1. Start a new Visual Basic Standard EXE project. Form1 is created by default.
  2. On the File menu, choose Add Project to add a new Visual Basic ActiveX DLL project, creating a Project Group. Class1 is created by default.
  3. Set the Instancing property of Class1 to 2-PublicNotCreatable.
  4. Add the following code to the General Declarations section of Class1:
    Option ExplicitPublic Property Get X() As LongEnd PropertyPublic Property Let X(ByVal X As Long)End PropertyPublic Property Get Y() As LongEnd PropertyPublic Property Let Y(ByVal Y As Long)End Property					
  5. On the Project menu, choose Add Class Module to add another class module to the project. Class2 is created by default. The Instancing property of Class2 is set to the default: 5-MultiUse.
  6. Add the following code to the General Declarations section of Class2:
    Implements Class1Private m_X As LongPrivate m_Y As LongPrivate Property Get Class1_X() As Long   Class1_X = m_XEnd PropertyPrivate Property Let Class1_X(ByVal X As Long)   m_X = XEnd PropertyPrivate Property Get Class1_Y() As Long  Class1_Y = m_YEnd PropertyPrivate Property Let Class1_Y(ByVal Y As Long)   m_Y = YEnd Property					
  7. Return to Project1 and add a CommandButton control to Form1.
  8. On the Project menu, choose References to open the References dialog box. Check the reference to Project2 and click OK.
  9. Add the following code to the General Declarations section of Form1:
    Option ExplicitPrivate Sub Command1_Click()   Dim point As Class1      Set point = New Class2      point.X = 10   point.y = 20   Debug.Print point.X, point.yEnd Sub					
  10. Set a break point on the Debug.Print statement, run the project, and click Command1.
  11. If the Locals window is not displayed, open the View menu and select the Locals window.
  12. In the Locals window, click the plus sign (+) next to "point" to expand the tree view. Note that the following error message appears in the column where the values of x and y should be:
    <Object does not support this property or method>
    In Visual Basic 5.0, the values of x and y are set to 10 and 20, respectively.
Properties

Article ID: 258207 - Last Review: 02/28/2014 00:31:53 - Revision: 2.0

  • Microsoft Visual Basic 6.0 Learning Edition
  • Microsoft Visual Basic 6.0 Professional Edition
  • Microsoft Visual Basic 6.0 Enterprise Edition
  • kbnosurvey kbarchive kbbug kbdebug kbpending KB258207
Feedback