FIX: Error 438"Object Doesn't Support This Property or Method"

Article translations Article translations
Article ID: 175616 - View products that this article applies to.
This article was previously published under Q175616
Expand all | Collapse all

On This Page

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. This problem has been fixed in Windows 98.

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.

Properties

Article ID: 175616 - Last Review: October 20, 2003 - Revision: 2.0
APPLIES TO
  • Microsoft Visual Basic 4.0 16-bit Enterprise Edition, when used with:
    • Microsoft Windows 95
Keywords: 
kbbug kbfix kboswin98fix kb16bitonly KB175616

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com