Excel Macros VBA Security

Excel VBA Consulting

VBA Excel help

Excel functions and formulas

 

VBA for Excel Tutorial

 

 

VBA for Excel Tutorial

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

VBA for Excel Lesson 10: VBA Macros Security and Protection in Excel

If you are using Excel 1997 to 2006 see lesson 10 here

Special note for users of Excel 2007: See how to install the Visual Basic Editor from your Office CD and set the security level of your Excel.

If you send a workbook with macros to a colleague and he can not get them to work it is probably because his security setting is at "High" . Tell him how to change his level of security by going to the "Developer" ribbon, clicking on "Macro Security", selecting "Macro Settings and checkink the second level "Disable all Macros with Notification" and you are set.

From then on each time you open a workbook that contains macros a temporary status bar appears above the grid in Excel:

Click on "Options" and the following dialog window will appear.

VBA for Excel Security macros enable window

Adopt the same attitude as you have with documents attached to Emails. If you know the origin of the file you may enable the macros if not click on "Disable Macros" and you are fully protected. You can look at the workbook but the VBA procedures (macros) are not operational. You can go to the Visual Basic Editor to take a look at the macros. If nothing looks suspicious close the workbook and re-open it enabling the macros.

Password Protecting the code

As an Excel-VBA Developer you might want to protect your code so that nobody else may modify it. In the VBE editor go to "Tools/VBAProject Properties/Protection" . Check the box and submit a password. Make sure that you save the password somewhere that you will remember. If ever you loose the password for an important workbook you can always buy a program on the Internet that will allow you to view the code even if it is password protected.

Remember that passwords are like any locks, they only keep the honest people out..


Tutorial on VBA for Excel (Macros)


There are  three sections in this website and in the downloadable tutorial on VBA for Excel.

Section 1: Excel Macros Programming: 10 lessons
This section is about recording, writing, modifying and testing macros in the Visual Basic Editor. You will learn about security and discover "events" (an event is what starts the macro).
Section 2: Excel VBA Vocabulary: 13 lessons
Developing a macro is like talking with Excel and to do so you need to use a language called VBA. There are over a thousand VBA words but you will really need only 100 to talk with Excel about workbooks, worksheets, cells, databases, loops and to develop simple and powerful macros.
Section 3: Forms and Controls in VBA for Excel: 10 lessons
The form is a small window that allows the user to submit values that will be used by the macro. To these forms you add controls (command buttons, text boxes, list boxes and others).


Excel Macros Security and Protection
Links to theTop of the Page

 
 

Excel VBA Consulting

Excel macros help

Exxcel functions and formulas