Try something like this.

Code:

Private Function IsTextBox(obj As Object) As Boolean

Dim objTemp As TextBox

On Error GoTo Err_NotTextbox:

Set objTemp = obj

IsTextBox = True

Exit Function

Err_NotTextbox:

IsTextBox = False

End Function
this returns true if obj is a text box and false if it isn't
Hope this helps