ident, i really don't understand what are you saying...
Regardless, i found a solution....still, having the function stored in a module!
Here it is :
Start with a button to trigger the worker...all in a form
' function stored in moduleCode:Private Sub cmdSTART_Click(sender As Object, e As EventArgs) Handles cmdSTART.Click WorkerL.ReportProgress(10, CALCULATE_NUMBERS) End Sub Private Sub WorkerL_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs) Handles WorkerL.DoWork CALCULATE_NUMBERS() End Sub Private Sub WorkerL_ProgressChanged(sender As Object, e As System.ComponentModel.ProgressChangedEventArgs) Handles WorkerL.ProgressChanged txtDebug.Text = e.UserState End Sub
Code:Public Function CALCULATE_NUMBERS() As String Dim a As Integer = 0 a = a + 1 CALCULATE_NUMBERS = a End Function




Reply With Quote