BUG: Error 438: "Object doesn't support this property or Method"

Last reviewed: October 24, 1997
Article ID: Q175616
The information in this article applies to:
  • Microsoft Visual Basic Enterprise Edition, 16-bit only, for Windows, version 4.0 on the following platform: Win95

SYMPTOMS

Error 438 occurs when running a program in which a form is assigned to a variable and that variable is used to access a control on the form if the program is on a system running Windows 95 with Regional Settings set to a setting other than English (United States). The error text is:

   Run-Time Error #438:
   Object doesn't support this property or method

RESOLUTION

There are two possible workarounds for this problem.

  • Access the form directly rather than by a variable containing the form.

    -or-

  • Create property procedures in the form's code to provide access to the properties of the controls on the form.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

To reproduce this bug consistently, you will need HeapWalker, a utility that ships with the Windows 16-bit Software Development Kit and the 16-bit version of Visual C++.

Steps to Reproduce

  1. From Control Panel, click Regional Settings to open the Regional Settings dialog box. Set the Regional Settings to English (Australian).

  2. Start the 16-bit edition of Visual Basic 4.0. If it is already running, select New Project from the File menu,.

  3. Add a CommandButton to Form1.

  4. Copy the following code to the Code window of Form1:

          Private Sub Command1_Click()
    
             Dim MyForm As Form
             Dim i As Long
             Set MyForm = Form1
             For i = 1 To 10000
                MyForm.Command1.Caption = i
                DoEvents
             Next i
           End Sub
    
    

  5. From the File menu, click Make EXE File to create an executable file.

  6. Run the executable file and then click the CommandButton in your program. While it is running, run HeapWalker's Segmentation Test. You will receive the run-time error #438.
Keywords          : vb416 VB4WIN
Version           : WINDOWS:4.0
Platform          : Win95 WINDOWS
Issue type        : kbbug


================================================================================


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: October 24, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.