Navigation bar
  Start Previous page
 51 of 156 
Next page End 46 47 48 49 50 51 52 53 54 55 56  

45
Along similar lines, subroutines and functions have an associated property called CodeAddress whose
type is Long.  The CodeAddress property is employed in a similar manner as the DataAddress property is
as shown by the example below.  Of course, use of the CodeAddress property of a subroutine is not
limited to the code in the subroutine itself.  It can be applied to any subroutine or function that is visible to
the code.  In short, if you can invoke the subroutine or function, you can also get it address via the
CodeAddress property.
Dim addr as Long
Sub Main()
  addr = Main.CodeAddress
End Sub
Previous page Top Next page