I met something alike when trying to use lambda expressions in VBNET2008.
As the keyword Function is used to indicate to the compiler that a lambda expression is used, the expression must return a value. In this scenario, the use of the keyword Sub would be more appropriate, but it is not possible yet in VBNET2008.
VBNET2010 should address this by allowing Subs within lambda expressions.
Here's an example of workaround that worked great for me at this question on SO:
What would be the equivalent VB.NET code for this C#...
In short, instead of writing your lambda expression into the core of your method, you need to point the Sub you wish to perform the work with using the AddressOf Sub.
David Parvin did also write the workaround exactly as you need it.
EDIT:
You could always opt for the delegate solution.
Private Delegate Sub MyMethodAsync()
Public Sub Button1_Click(...) Handles Button1.Click
Dim myMethodAsync As MyMethodAsync = AddressOf MyDoWorkAsync
_myBackgroundWorker.RunWorkerAsync(myMethodAsync)
Dim loadingForm = New LoadingForm()
loadingForm.ShowDialog()
End Sub
Private Sub _myBackgroundWorker_DoWork([parameters here...]) Handles _myBackgroundWorker.DoWork
' Do some stuff...
End Sub
I know it ain't anonymous method, thus you might have a real hard time trying to work this way in VBNET, even 2008. Such features are supposed to be part of VBNET2010, but I think they cut it out, but I'm really not sure enough to confirm it firmly.
Hope this helps!