How to pass parameters to AddressOf for thread?

  • Thread starter Thread starter Brett
  • Start date Start date
B

Brett

I'm creating a second thread from my main form like this:

Public t As System.Threading.Thread = New System.Threading.Thread(New
System.Threading.ThreadStart(AddressOf _
SynchItObj.ExportAccessToText(CSVFilePath, CSVFileName,
DatabaseFileName)))

It give this error:
'AddressOf' operand must be the name of a method; no parentheses are
needed.

I need to pass in the above file paths and names. These are set in the main
form and then passed to the class, which is running on the above created
thread. How can I do this?

Thanks,
Brett
 
Back
Top