Check if a control is locked or enabled

K

Kpatel

How can I check in VBA if a control is locked or enabled? What I want to do
with this is that if a control is locked and disabled I want to change the
appearance of the control and if it is not locked and enabled then I want the
control to have the default appreance. I hope I am being clear. If not do
let me know.

Any help will be appreciated.

Thanks
 
M

Marshall Barton

Kpatel said:
How can I check in VBA if a control is locked or enabled? What I want to do
with this is that if a control is locked and disabled I want to change the
appearance of the control and if it is not locked and enabled then I want the
control to have the default appreance. I hope I am being clear. If not do
let me know.


Just check it's property:

If Me.somecontrol.Locked Then
Me.somecontrol.Locked.BackColor = vbRed
End If
 
Top