Excel VBA Courses Wean Users Off The Macro Recorder
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.
Secondly, recorded macros will only run properly under the conditions in which they were originally recorded. For example, if a particular worksheet needs to be active at a certain point and it is not active when the macro is played back, an error will occur.
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.
Naturally, there is a bit of a steep learning curve for any users who have done little or no programming. For this reason, we run a five day crash-course in Excel VBA for fledgling macro programmers. We have found that this provides everyone with a chance to gain some degree of confidence with the challenging VBA environment.
After weaning users off the macro recorder, we explain to them the syntax and structure of VBA. They learn how to use variables to store both data and references to Excel objects, how to code logical and iterative structures and how to allow the person running a macro to choose between different options.
Getting some training on Excel VBA is always worth the effort. It can take the productivity of an Excel user to a new level very rapidly. Monthly procedures and reports which used to take long hours can suddenly be accomplished with astounding ease and lightening speed.
Getting trained on Excel VBA is a great way to wean oneself off the macro recorder. However, the recorder will still always have its uses. For example, when you are working with an Excel object or a series of steps with some degree of programmatic complexity, recording a few steps then looking at the code generated is a great way to learn new syntax.
Last 5 posts by Andrew Whiteman
- Using The Office Button And Quick Access Toolbar In Microsoft Excel - October 14th, 2008
- Will QuarkXpress Survive The Adobe Onslaught - October 12th, 2008
- How To Avoid Frustration When Learning Adobe Illustrator - October 10th, 2008
- Creating A Basic Excel Formula - October 6th, 2008
- Excel 2007 What Would We Do Without Functions - October 1st, 2008
Related posts
- Using The Office Button And Quick Access Toolbar In Microsoft Excel
- Excel 2007 What Would We Do Without Functions
- Creating A Basic Excel Formula
- InDesign Training For General Users
- Tips For End Users of Excel 2003 and 2007
Like this post? Publish It On Your Own Blog
