The information in this article applies to:
SUMMARYMost, but not all, of the functions and procedures available in Visual Basic 4.0 can be viewed by selecting the "VBA - Visual Basic For Applications" library in the Object Browser. For example, the StrConv function is visible, but the StrComp and InStr functions are not. The subroutines that are not visible do not support named arguments. MORE INFORMATION
This behavior is caused by a difference in the internal representation of
different statements and procedures. All of the subroutines available in
Visual Basic 4.0 are a part of Visual Basic for Applications, and are
included in the VBA type library. However, some functions and procedures
were also implemented internally in either Vb32.exe or Vb.exe to improve
performance.
Because the ABS function is implemented in two places, and because Visual
Basic uses the internal version by default, the above line of code
generates the error:
The use of the VBA version of the function (as well as of named arguments) can be forced by explicitly referencing the VBA type library in the call to the function or subroutine. For example, the following works properly:
In this case the function used resides in the type library.
Because the subroutines that have been implemented internally do not support named arguments by default, they were removed from the Object Browser to prevent copying and pasting of calls with incorrect syntax. Named arguments can still be used, as long as each call includes the "vba." prefix to tell Visual Basic to use the Visual Basic for Applications version of the function. Additional query words: 4.00 vb4win vb4all vba
Keywords : IAPVBA |
Last Reviewed: January 20, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |