Error Message: Property or Method Not FoundLast reviewed: February 19, 1998Article ID: Q180727 |
The information in this article applies to:
SYMPTOMSWhen you run a 16-bit program created using Microsoft Visual Basic 4.0, you may receive either of the following error messages:
CAUSEThese error message can occur if the following conditions exist:
RESOLUTIONTo work around this problem, use any of the following methods:
STATUSMicrosoft has confirmed this to be a problem in Windows 95 and Windows 95 OEM Service Release 2 (OSR2). We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATIONMicrosoft Visual Basic 4.0 relies on these string-comparison functions to find names of the program's controls when the controls are referenced as variables (see below). Programs created using Microsoft Visual Basic 4.0 have their control names stored in code segments marked discardable. Under relatively low-memory conditions, one or more of these segments may be discarded, to be reloaded again as needed. When non-U.S. regional settings are in use, the LSTRCMP and LSTRCMPI functions do not cause the discarded code segment to be reloaded when the strings are compared, and return a result indicating that the strings do not match. When the string comparison does not find the matching control name when it is needed, the program displays one of the error messages, may not be able to continue running, and may terminate unexpectedly. The following code samples demonstrate how a control can be referenced as a variable with Visual Basic: Example 1:
Dim myForm As Form Set myForm = Form1 If myForm.ssTab1.Tab = 1 Then ' Error 438 when (.) operator is used MsgBox "Tab 1" End IfExample 2:
Dim myForm As Form Set myForm = Form1 If myForm!ssTab1.Tab = 1 Then ' Error 423 when (!) operator is used MsgBox "Tab 1" End IfYou can work around this problem by using the (.) operator and changing the code to use a Property procedure, as in this example:
Dim myForm As Form Set myForm = Form1 If myForm.Tab1.Tab = 1 Then ' No error with (.) operator MsgBox "Tab 1" End If Public Property Get Tab1() As Control Set Tab1 = ssTab1 End Property REFERENCESFor additional information, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q178529 TITLE : BUG: LSTRCMP and LSTRCMPI May Fail With Non-US Regional Settings |
Additional query words: 95
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |