Make your own free website on

Visual Basic Tutorial Part 4 IT Career Partner For Life. Please Bookmark It.
Homework Help | Buy Book | Buy Phone | Top Web Hosts | Hire Web Designer
Home | Interview Questions And Answers | Hosting Charges | Online Tuition
Top Domain Registrars | Hire Freelancer | Employee Provident Fund | Hindi News

AddressOf can only be used immediately preceding an

argument in an argument list; that argument can be the
name of a user-defined sub, function, or property.

The sub, function, or property you call with
AddressOf must be in the same project as the related
declarations and procedures.

You can only use AddressOf with user-defined subs,
functions, or properties -- you cannot use it with
external functions declared with the Declare
statement, or with functions referenced from type

You can pass a function pointer to an argument that
is typed As Any or As Long in a declared Sub,
Function, or user-defined type definition.
Note You can create your own call-back function
prototypes in DLLs compiled with Visual C++ (or
similar tools). To work with AddressOf, your prototype
must use the __stdcall calling convention. The default
calling convention (_cdecl) will not work with


25. What is the difference between a Sub and a

Sub won't return values

Fuction return values

26. How will you retain the values of existing
elements in a dynamic array when you want to alter the
array size?

Redim with preserve keyword

27. How will you define a function to accept variable
number of arguments ?

28. How will you define a function to accept optional

Using optional key word
29. How does the following statements work? On Error
Goto Err_Handler

Next topic
Previous topic