VBA, or Visual Basic for Applications, is the simple programming language that can be used within Excel 2007 (and earlier versions, though there are a few changes that have been implemented with the Office 2007 release) to develop macros and complex programmes. The advantages of which are:
- the ability to do what you normally do in Excel, but a thousand times faster
- the ease with which you can work with enormous sets of data
- to develop analysis and reporting programmes downstream from large central databases such as Sybase, SQL Server, and accounting, financial and production programmes such as Oracle, SAP, and others.
Macros save keystrokes by automating frequently used sequences of commands, and developers use macros to integrate Office with enterprise applications - for example, to extract customer data automatically from Outlook e-mails or to look up related information in CRM systems or to generate Excel spreadsheets from data extracted from enterprise resource planning (ERP) systems.
To create an Excel spreadsheet with functionality beyond the standard defaults, you write code. Microsoft Visual Basic is a programming environment that uses a computer language to do just that. Although VBA is a language of its own, it is in reality derived from the big Visual Basic computer language developed by Microsoft, which is now the core macro language for all Microsoft applications.
To take advantage of the functionalities of the Microsoft Visual Basic environment, there are many suggestions you can use or should follow. Below we will take a look at a few hints and tips for VBA security and protection in Excel, a more in-depth understanding of which can be gained by attending a VBA Excel 2007 course, delivered by a Microsoft certified trainer.
Password protecting the code
As a VBA Excel user you may want to protect your code so that nobody may modify it and to protect against the loss of intellectual property if people access source code without permission. This is easily achieved in the VBE editor by going to "Tools/VBAProject Properties/Protection". Check the box and enter a password.
Hiding worksheets
In any or all of your Excel workbooks you might want to hide a worksheet that contains sensitive or confidential information from the view of other users of the workbook. If you just hide the worksheet in the standard way the next user will be able to simply unhide it, but by using a VBA method to hide and password protect a worksheet, without protecting the entire workbook, you will be able to allow other users access without affecting the confidentiality of the data.
Protecting workbooks
There are different levels of protection for workbooks, from not allowing anyone access to the workbook to not allowing any changes to be made to it, i.e. setting the security to 'read only' so that no changes can be made to the templates you have created.
You have permission to publish this article for free providing the "About the Author" box is included in its entirety.
Do not post/reprint this article in any site or publication that contains hate, violence, porn, warez, or supports illegal activity.
Do not use this article in violation of the US CAN-SPAM Act. If sent by email, this article must be delivered to opt-in subscribers only.
If you publish this article in a format that supports linking, please ensure that all URLs and email addresses are active links, without the rel='nofollow' tag.
Software Training London Ltd. owns this article. Please respect the author's copyright and above publication guidelines.
If you do not agree to these terms, please do not use this article.
"I thought the trainer had a lovely manner and explained everything clearly and made it look easy. He gave equal individual attention and could answer all questions."
Media Business Insight Limited (MBI) Adela Curaj
"The trainer's delivery of the Excel training was great. Very enthusiastic, patient and was able to gauge the room's speed and level of understanding. She also let people know they can whizz on ahead with more practice examples if they were quickly getting the hang of it (which I really liked). My only suggestion would be to include examples of manipulating bigger data sets. Otherwise a good day all round and I am sure everyone will walk away more informed and efficient Excel pros. Thank you!"
"Terry was great - really personable and friendly and made you feel relaxed and comfortable from the get go. Helpful with answering questions and learning how to deal with different behaviours in the workplace. I think the only comment I have would be that it would have been more beneficial to have had more like-minded people on the course who came from similar industries (for me personally this would be private sector) and at same level in the workplace that you could then bounce off. Maybe a case of knowing info/details about those attending the course beforehand and then organising particular groups that are more appropriate."