**Developer**
Do you mean you want to do something like:
' Define what some sub should look like
Public Delegate Sub ASub(ByVal value As Integer)
Public Sub Main()
' pass the "address" of SomeSub
Sub2(AddressOf SomeSub)
End Sub
Public Sub Sub2(ByVal asub As ASub)
' we already have the "Address" so just pass it
SystemSub(asub)
End Sub
Public Sub SystemSub(ByVal asub As ASub)
asub.Invoke(10)
' Invoke is optional, so you can also use:
asub(10)
End Sub
Public Sub SomeSub(ByVal value As Integer)
' Do something exciting with value.
End Sub
--
Hope this helps
Jay [MVP - Outlook]
T.S. Bradley -
http://www.tsbradley.net
" **Developer**" <RE*************@a-znet.com> wrote in message
news:uS**************@TK2MSFTNGP09.phx.gbl...
| Now I do
|
| SyatemSub(AddressOf Somesub)
|
|
| I want to define a sub as follows
|
|
| Sub2(???)
| SystemSub(???)
| End Sub
|
| And call it thus:
| Sub2 (Address of SomeSub)
|
| Can I do that?
|
|