The information in this article applies to:
SYMPTOMSThe WIDTH # statement is used to assign an output-line width to a file opened using the Open statement. However, the sample code given in the Visual Basic Help file does not work in a form. STATUSMicrosoft has confirmed this to be an issue in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available. MORE INFORMATIONThe problem is that Visual Basic interprets the "Width" statement as a property of the Form when the code is run from a Form module. When run from a Code module or a Class module, the statement functions as documented because there is no default object on which to apply the Width property. Visual Basic 4.0 can be forced to use the correct Width statement in this case by specifying the call using "Typelib.Method" syntax. The Width statement is actually a "Visual Basic for Applications" (VBA) method, so the following syntax must be used:
NOTE: The compiler will not accept this statement unless the "#" symbol is
removed.
Steps to Reproduce
Additional query words: kbVBp400 kbVBp500 kbVBp600 kbVBp kbdsd kbDSupport kbVBA500 kbCompiler
Keywords : kbGrpVB |
Last Reviewed: February 2, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |