Disable Controls

S

Steven

I would like to disable some controls but I have a question?

What does disabling a control do? Can't someone just open another excel
worksheet and enable the control back therefore easily undoing what you were
trying to accomplish?

How do you control that?

Thank you,

Steven
 
N

NateBuckley

It "ghosts" out the control, makes it grey so you can't click it etc.

Someone could I guess just go in and go into design mode then Enable the
controls, if you are putting the controls on a sheet then I'm quite sure
protecting the sheet (tools->protection->protect sheet) then you cant change
the controls properties to re-enable it.

I think the same goes for User forms, when you lock your code from viewing
you can't edit the userform without knowing the password (if you add one)

Thats one way. Another way would be under certain events like when a control
gets focus to just enable = false all the time. Depends what you want to do.

Hope that helped a little.
 
S

Steven

That does not address the issue. How do you keep someone from just opening
another workbook and in their new file's vba just write code to enable the
controls back. This has nothing to do with Sheet Protection or Workbook
protect or Forms or Passwording a workbooks VBA.

Still seeking a resolution.


Steven
 
N

NateBuckley

Criest only trying to help, I had just presumed if it was passworded it
wouldn't let you mess around with controls properties without the password
even within another spreadsheet.
 
O

Office_Novice

Steven, I belive the solution to you're query is, Right click your project in
the VBE -->Click project properties --> Click the protection Tab --> Click
the Lock Project for veiwing checkbox --> Enter your pasword. These steps
along with naming your controls somthing unique will make it more difficult
for one to change your poject. I hope that helps.
 
S

Steven

That is interesting. I looked around but do not see how you rename a
control. Can you give me an example of how to rename the Tools control.

Thank you,

Steven
 

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

Top