I already resolved it. I did as you suggested but the trick was to pass on the TextBox with double apostrophes around the name of the textbox:
Code:
YourLibrary.DoSomthingWithTextBox("TextBox1")
From my test-application in VB.NET it works without the double apostrophes:
Code:
YourLibrary.DoSomthingWithTextBox(TextBox1)
Thank you Erel