You can test if the textbox itself is != null that is if you know the variable exists but you don't knof if it has been initialised, something like this,Getox said:Hmm, it froze the app for 5 seconds...
Textbox mytextbox;
if(mytextbox != null)
{
mytextbox.Text = "some text";
}
else
do something else
Sub SetText(Text As String)
If Not (MyTextBox Is Nothing) Then 'If the textbox exists
MyTextBox.Text = Text
Else
'You might want to respond to the fact that part of the
'program is trying to assign text to a non-existant textbox.
End If
End Sub