PRB: Can't Have Multiple Declare Statements for Same Function
Article ID: 129446
Article Last Modified on 12/9/2003
APPLIES TO
- Microsoft Visual Basic 4.0 Standard Edition
- Microsoft Visual Basic 4.0 Professional Edition
- Microsoft Visual Basic 4.0 Professional Edition
- Microsoft Visual Basic 4.0 16-bit Enterprise Edition
- Microsoft Visual Basic 4.0 32-Bit Enterprise Edition
This article was previously published under Q129446
SYMPTOMS
Visual Basic version 4.0 generates a compile error if there are two Declare
statements with the same name in the project when the Declare statement
takes a UDT (User Defined Type) or object as a parameter. However, there is
no problem if none of the parameters are UDTs or Objects.
RESOLUTION
Put the Private keyword in front of one of the Declare statements.
STATUS
This behaviour is by design. This behavior was allowed in Visual Basic
version 3.0, but is no longer allowed in Visual Basic version 4.0.
Additional query words: incompatibility 4.00 vb4win vb4all
Keywords: kbprb KB129446