Feb 20, 2003 #1 T technomag New member Joined Sep 28, 2002 Messages 4 Hi everybudy i am trying to change the visible proprty of all my textboxes on the form to true. Code: Dim obj As Object For Each obj In Me.Controls If (obj Is TextBox) Then obj.Visible = True End If Next how do i fix? thanks
Hi everybudy i am trying to change the visible proprty of all my textboxes on the form to true. Code: Dim obj As Object For Each obj In Me.Controls If (obj Is TextBox) Then obj.Visible = True End If Next how do i fix? thanks
Feb 20, 2003 #2 C Cywizz Well-known member Joined Jan 31, 2003 Messages 136 Location JHB, South Africa try: Code: Dim objAs Control For Each obj In Me.Controls If typeof obj Is TextBox Then obj.Visible = True End If Next
try: Code: Dim objAs Control For Each obj In Me.Controls If typeof obj Is TextBox Then obj.Visible = True End If Next
Feb 20, 2003 #3 T technomag New member Joined Sep 28, 2002 Messages 4 thanks, it solved part of the problem but i now get: Option Strict On disallows late binding. Click to expand... on the line: Code: obj.Visible = True
thanks, it solved part of the problem but i now get: Option Strict On disallows late binding. Click to expand... on the line: Code: obj.Visible = True
Feb 20, 2003 #4 C Cywizz Well-known member Joined Jan 31, 2003 Messages 136 Location JHB, South Africa Is the obj variable declared as type Control or Object?
Feb 20, 2003 #5 T technomag New member Joined Sep 28, 2002 Messages 4 true, it was object and not Control. thanks very much Cywizz, it now works perfectly