Search : in
By :

Disable buttons in Macro

Last answer on Feb 6, 2009 3:00:01 am GMT Ron, on Feb 5, 2009 2:37:13 pm GMT 
 Report this message to moderators

Hello,

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!

Regards,
Ron

Configuration: Windows XP
Internet Explorer 6.0

Best answers for « Disable buttons in Macro » in :
Adding a VBA CommandButton with its respective the code ShowAdding a VBA CommandButton with its respective the code Paste these two sub in a general module (Module1 for example). Sub CreateButton() Dim Obj As Object Dim Code As String Sheets("Sheet1").Select 'create button ...
How to easily display PHP/HTML codes in your webpages ShowHow to easily display PHP/HTML codes in your webpages What code to use? If you want your visitors to be able to see the source codes of your webpage, there is a very easy way to do so. Normally, all you have to do in a HTML file using...
Display Add/Remove Programs ShowDisplay Add/Remove Programs Solution When trying to uninstall a program in the add/remove programs, below error message appears on your screen: An unexpected error occurred Object does not support this property or method...
Download Super Macro ShowSuper macro is a free software which allows to create macro under Windows in order to activate diverse automatic actions. Apart being free, this software is easy to use and requires no knowledge in programming. You just simply click buttons, then...
Download HP USB Disk Storage Format Tool ShowHP USB Disk Storage Format Tool is a small utility allowing to format a key USB or READER MP4. It also allows to make a key (Bootable). This software works with all keys and readers MP4 of the market. To make work this utility under Windows...
Book disk ShowSystem disk A system disk, also sometimes called a boot disk, is a disk that will allow you to start a computer when the operating system no longer responds, as the result of a virus for example. This disk contains special information that makes it...

1

 Helper, on Feb 6, 2009 3:00:01 am GMT

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.
Click OK.

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.

Reply to Helper