BUG: Error Occurs When Printing a Form Stored in an Array (141680)
The information in this article applies to:
- Microsoft Visual Basic Standard Edition, 32-bit, for Windows 4.0
- Microsoft Visual Basic Professional Edition, 16-bit, for Windows 4.0
- Microsoft Visual Basic Professional Edition, 32-bit, for Windows 4.0
- Microsoft Visual Basic Enterprise Edition, 16-bit, for Windows 4.0
- Microsoft Visual Basic Enterprise Edition, 32-bit, for Windows 4.0
This article was previously published under Q141680 SYMPTOMS
An application error occurs when calling the Print method of a form object
contained within a form array.
RESOLUTION
To work around this problem, define a non-array form variable and set the
variable to reference the form array element that you want to manipulate.
Once this variable has been initialized, you can safely call the Print
method of the newly defined Form variable, as shown in the example below:
Private Sub Form_Load()
Dim MyForm As Form
Dim fl(1) As Form2
Set fl(0) = New Form2
Set MyForm = fl(0)
MyForm.Show 'Show the Form2 form
MyForm.Print 'Print the form to the screen
End Sub
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. Microsoft is researching this problem and
will post new information here in the Microsoft Knowledge Base as it
becomes available.
Modification Type: | Major | Last Reviewed: | 12/9/2003 |
---|
Keywords: | kbBug kbpending KB141680 |
---|
|