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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Please find to fight this error

Status
Not open for further replies.

sabavno

Programmer
Jul 25, 2002
381
CA
Hi

I have this code

Dim frm As Form_AddRecord1
Dim x As TextBox

For Each x In frm
If x.Visible = False Then
x.Visible = True
End If
Next x

And I get an error "Object required"

Why is that?

Please help.
 
Dim ctl As Control

For Each ctl In Form_AddRecord1
If Not ctl.Visible Then
ctl.Visible = Not ctl.Visible
End If
Next ctl

Good Luck!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top