Greying-out contents of frames
Greying-out contents of frames
(OP)
When you disable a frame by setting its enable property to false, the contents of the frame are disabled but not greyed out. Is there a way to grey them out without writing code to individually enable/disable every control in the frame?
RE: Greying-out contents of frames
RE: Greying-out contents of frames
RE: Greying-out contents of frames
As long as you don't have container objects inside of the outer frame, you don't need to worry about it.
RE: Greying-out contents of frames
Dim objCtl As Object
For Each objCtl In Controls
If objCtl.Container.Name = MyFrame Then
objCtl.Enabled = False
End If
Next
RE: Greying-out contents of frames
There are two ways to deal with this. One way is to take the SysInfo control outside of the frame so that its containiner is the form. Second, you could use the on error resume next statement, to ignore the error.
RE: Greying-out contents of frames
If TypeOf objCtl Is SysInfo Then
.
.
Everything works fine now. Thanks for your help.