I want to know how to disable the buttons or grey them out in the macro window, when we click on Tools > Macro > macros > we get the window where we can see the buttons on the right side which is Run, Cancel, Step into,Edit,Create,Delete,Options. After creating macro I would not like others to see the code coz there are chances that they might make some changes. I would like to have only Run and Cancel buttons enabled. It is possible because I have a spreadsheet created by an unknown person who has done this. Can someone help me!
While in the Visual Basic Editor, Click Tools -- VBA Project Properties.
In the General tab type a name for your project.
Now click the Protection tab.
Click the Lock project for viewing box.
Next, type a password in the box.
Type it again to confirm.
Save your excel file and close it.
Reopen your excel file and go to Tools -- Macros.
It will be greyed out as you desired.
Now go to the Visual Basic Editor and double click your project.
It will prompt you for a password.