View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Claud Balls Claud Balls is offline
external usenet poster
 
Posts: 72
Default selection all textboxes in userform at once

I don't think that you can select one type of controls, and change there
values at the same time. You can loop through your controls. I've
posted some code I've used to clear all my text boxes.

For Each txtcontrol In Controls
If Left(txtcontrol.Name, 2) = "tx" Then txtcontrol.Text = ""
Next

As a naming standard, all of my text boxes start with "tx" so that is
how I clear only text boxes.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!