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.
"A lot was covered in the two days and at times it was a bit stressful trying to keep up with topics that I had never covered before. I enjoyed the course and Paul's delivery and knowledge. Hopefully I will be able to use the course to improve consistency and efficiency within my work role."
Microbiology Society Policy And Engagement Officer Katie O'Connor
"Tony was very friendly and helpful and it was an informative and fun experience!"
MOL (Europe Africa) Ltd Assistant Technical Manager James Dallimore
"Very well delivered and throughly engaging. Re. content sometimes it felt slightly unstructured jumping from different aspects of the project management, it would be helpful for me if maybe it went one by one of the stages from start to end of a project maybe with case study examples. For the case study exercise in pairs I felt it was a bit rushed and no time to relfect each other answers in depth. Really enjoyed the course and covered a lot of items in s short space of time which I will be able to apply to my work scope."