Public Sub ClearAllText(frm As Form, ctl As Control) For Each ctl In frm If TypeOf ctl Is TextBox Then ctl.Text="" End If Next ctl End Sub