BUG: Print Method Does Not Work Within a With-Block (191215)
The information in this article applies to:
- Microsoft Visual Basic Learning Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
This article was previously published under Q191215 SYMPTOMS
In Visual Basic, although the Print method exists on the Printer and Form
objects, it does not work within a With-block. The Print method is also not
listed in the Object Browser.
When you try to invoke the Print statement within a With-block, the
following error occurs when you run the program:
Compile error: Method or data object not found
CAUSE
The problem arises because Visual Basic is not parsing the Print identifier
within the With statement correctly.
RESOLUTION
Remove the Print method from the With-block.
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.
Modification Type: | Major | Last Reviewed: | 5/12/2003 |
---|
Keywords: | kbBug kbcode kbCompiler kberrmsg kbpending KB191215 |
---|
|