View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Tushar Mehta Tushar Mehta is offline
external usenet poster
 
Posts: 1,071
Default selection all textboxes in userform at once

In addition to Claud's suggestion, you can also check the type of each
control. Something along the lines of

Dim x As MSForms.Control
For Each x In Me.Controls
If TypeOf x Is MSForms.TextBox Then
x.Enabled = Not x.Enabled
End If
Next x

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...
I made a userform with over 20 textboxes (TBX). All boxes have a 'easy to
understand' name. At some moment I need all testboxes to be 'opened' or
'blocked' or to be 'emptied'. Is there a way to select all TBX at once?

My current solution looks like this:

MultiPage1.Value = 0 'Gegevens
GegKl.Enabled = True
GegNm.Enabled = True
GegRubr1.Enabled = True
GegRubr2.Enabled = True
GegStnr.Enabled = True
GegWplts.Enabled = True
MultiPage1.Value = 1 'Dressuur
DrPnt.Enabled = True
DrPntOv.Enabled = True
DrStnr.Enabled = True

Thank you so much for your help!!