You've got the idea right, but I'd do something like this:
Code:
Dim tTemp As Control
For Each tTemp In Me.Controls
If TypeOf tTemp Is TextBox Then
tTemp.Text = ""
ElseIf TypeOf tTemp Is Label Then
tTemp.Text = ""
End If
EDIT: Original code was in vb6, it's .net now. Also, picturebox part didn't work. Working to fix it now.
|
Last edited by drognir; 02-02-2006 at 05:14 PM.
|