Check if a control is locked or enabled

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top