98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsPrevious article Next article VBA articles
It Pays To Learn To Speak The VBA Language
Wed 29th December 2010
The great advantage that typed VBA programs have over their recorded counterparts is that far more complex programs can be created, allowing the programmer the scope to do a lot more. So it is definitely worth the effort to make the step up from recording macros to typing your own, but to do this you are going to have to speak to your computer in VBA's own programming language. After all, VBA is there specifically for the user to develop macros and more complicated programs.
But in these days where almost anything you can do within Office can be done with the click of a mouse, the phrase 'programming language' may conjure up the dread image of a bespectacled, arm-waving lecturer on an Open University TV programme, or the nerds in The Simpsons, each typing away at his own workstation. For creating a program is all about inputting data and that can appear quite scary.
So to create a non-technical parallel, imagine you had a very clever dog that, on your command, would trot off to the newsagent's for the evening paper. Then, following another command, he would go and fetch your slippers. Finally a third command would send him to his basket to lie down. Very impressive, but as each command is issued separately then you have to wait for him to return with the evening paper before you send him away for your slippers and so on.
To free up more of your time you teach the dog to obey a new, single command that tells him to do all of the above tasks and in that order. You can now send him on his way and watch Deal or No Deal in peace, knowing that your paper and slippers are coming up. Swap the dog for an Office application and the tasks it performs for tasks within that application and you see how macros can save you time and effort.
This is the kind of efficiency saving you can make using VBA but how about some more practical demonstrations than the slipper-fetching dog?
Right well let us suppose you are running a website for your local football team. Here are three quick examples of how VBA could save you time and effort.
Outlook
You are running a photographic competition to try and discover your club's scariest looking fan and you invite contestants to submit their work via email as attachments. Opening each individual mail to view what is attached would be a time-consuming process. How much easier it would be if each attachment was automatically sent into a specific folder where they could be viewed at leisure. You can create such a folder with VBA.
Word
You deal with all the administration for the website. You send out quite a lot of letters and so anything that helps you to cut corners is welcomed. You close each letter with those words uttered so often within the football fraternity, 'Keep the faith'. To save you having to sign off in this manner every time you type a letter, a VBA macro can do it for you.
Excel
You have a separate workbook for each of the twenty teams in your league. Every Monday you update the weekend's results in each of these workbooks. Each workbook has a 'last updated' cell in which you enter the date you last updated the record for that particular team. As all of the workbooks are usually updated every Monday it would be nice if there was a way to put this new date into each of them without having to open twenty workbooks and type it in each one. Well guess what...
There are many more ways that VBA can help streamline your busy schedule. Getting to grips with programming is really not that difficult but it does instil a sense of achievement as it quite a technical subject, rather like learning a new language. And once you master this new language, believe me, your skills will be in demand.
Author is a freelance copywriter. For more information on vba training london, please visit https://www.stl-training.co.uk
Original article appears here:
https://www.stl-training.co.uk/article-1334-it-pays-learn-speak-vba-language.html
London's widest choice in
dates, venues, and prices
Public Schedule:
On-site / Closed company:
TestimonialsKao (UK) Limited
Regulatory Officer Helen Boshier Personal Resilience Sarah is a great trainer! Begley Consulting
PM Justin Begley Project Introduction This was a great course and delivered everything I wanted. Many thanks Adam! Brunswick Group LLP
Group Accountant Fiona Turnbull Excel Advanced Really helpful course - thanks! |
PUBLICATION GUIDELINES