Click to See Complete Forum and Search --> : Control


ctng
December 20th, 1999, 10:32 PM
Hi,
How do I clear the TextBoxes in an ActiveX Control
in a smarter way rather than clear it one by one.

Bye

Chris Eastwood
December 21st, 1999, 02:43 AM
Have a routine in your UserControl that does something like :


Dim ctl as Control

for Each ctl In UserControl.Controls
If TypeOf ctl is TextBox then
ctl.Text = ""
End If
next





Chris Eastwood

CodeGuru - the website for developers
http://codeguru.developer.com/vb

ctng
December 21st, 1999, 09:01 PM
Hi Chris,

Just want to know how to plug the short routine into a Module so that I can call as and when I want.

Bye,
Ng Chee Tin