Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting a property of *all* controls 1

Status
Not open for further replies.

rickyoswaldiow

Programmer
Jul 16, 2007
127
GB
Is there a shortcut to setting a property, say .enabled, of all controls on a form besides making control arrays and looping through them?
 
> besides making control arrays

Loop through ALL controls on a form:

Dim ctl as VB.Control
For each ctl in me.controls
on error resume next
ctl.enabled = false
next ctl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top