Categories



Navigation



ShowCase

Search
















Get Excel VBA Training And Forget The Macro Recorder | Software

By AndrewWhiteman
Total views: 2
Word Count: 461














Most people's first exposure to Excel VBA (Visual Basic for Applications) involves recording a macro. As the user performs a series of steps (for example opening a workbook going to a particular worksheet, copying some data, etc) Excel faithfully records each step by creating the necessary VBA code. Each time the user runs the macro, the steps are replayed exactly as they were recorded.

Recording macros is ideal for really simple tasks such as producing an extremely strait-forward report. However, there are distinct restrictions on this approach. Firstly, because Excel plays back the steps just as they were originally performed, recorded macros are often painfully slow.

Also, recorded macros will only run normally under the conditions in which they were originally recorded. Thus, for example, if a particular worksheet has to be active at a certain point and it is not active when the macro is played back, the user will get an error.

This means, effectively, that recorded macros can only really be used by the person who recorded them. They cannot be distributed to one's work colleagues.

One of the first things we find we have to do on the Excel VBA training courses that we run at our London training centre is to steer users away from the macro recorder. We offer them a good grasp of the Excel object model, a way of programmatically encoding each of the elements within the Excel environment such as the application itself, workbooks, worksheets and cell ranges.

Admittedly, Excel VBA can be difficult to grasp for those users who have done little or no programming. This is one reason why we prefer to run a five day intensive Excel VBA training course aimed at people new to VBA. We find that this approach gives everyone a chance to gain confidence and familiarity with this o environment.

Once we have put the recorder on a back-burner, we teach delegates the syntax and structure of VBA. We show them how to use variables to store both data and references to Excel objects (such as workbooks), how to create logical and iterative coding structures and how to allow the person running your macro to make choices.

Getting some training on Excel VBA is definitely worth the effort. It can take greatly increase one's productivity. For example, monthly procedures and reports which used to take ages to complete can suddenly be accomplished at the click of a button.

Getting trained on Excel VBA is the only real way of losing one's initial reliance on the macro recorder. However, the recorder should not be disregarded altogether. For example, if you find yourself working with an Excel object or procedure you find difficult to code, recording a few steps then examining code Excel generates is an excellent way to learn new VBA syntax.

About the Author

The The writer of this article is a trainer and developer with Macresource Computer Solutions, an independent computer training company offering Microsoft Excel VBA Classes in London and throughout the UK.


Rating: Not yet rated

Comments

No comments posted.

Add Your Comment

To leave a comment, please log in first.

You are here Articles > Computers > Software