How to pass parameters to AddressOf for thread?

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top