MrSandman666
Programmer
Hello everybody.
Yesterday night I was trying to write a little bit of code to disable/hide all the controls in a form. I did something like this:
dim MyControl as Control
For Each MyCOntrol In frmMain.Controls
MyControl.Visible = false
Next MyControl
I wrote this off the top of my head since the source code is on another computer, so please excuse any typos. Basicaly the code looks correct, right? To me it does. But still, when I try to run the program, the compiler always tells me that MyControl doesn't support the property. What's going on here? I took this right from a book! It should work. Is there something I might have overlooked?
Please! Help!
Yesterday night I was trying to write a little bit of code to disable/hide all the controls in a form. I did something like this:
dim MyControl as Control
For Each MyCOntrol In frmMain.Controls
MyControl.Visible = false
Next MyControl
I wrote this off the top of my head since the source code is on another computer, so please excuse any typos. Basicaly the code looks correct, right? To me it does. But still, when I try to run the program, the compiler always tells me that MyControl doesn't support the property. What's going on here? I took this right from a book! It should work. Is there something I might have overlooked?
Please! Help!