Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

Previous article   Next article back to categoryVBA articles

VBA - Not Just For Programmers

Tue 24th November 2009

VBA carries with it a sense of clique - it's for programmers only, not the average Office user who is well versed in the applications, but would never think of manipulating them to suit your taste. No, it's not coding (or rewriting code) as much as you may think and it's not risking making a programme unworkable. VBA is, in fact, a way to make your life easier - and who wouldn't want that? Have a look at our VBA training courses.

Another myth about VBA is that you have to write a program or application from scratch. This isn't true and a great relief to those of you who are thinking of learning VBA but who find the prospect of a blank template to be filled with beautifully coded algorithms utterly terrifying. Most of us have heard of ActiveX Controls - if only to authorise our browsers to load them - but they are a typical component of VBA. You can simply edit existing code or use an open source 'library' of code, posted by other VBA users and have a play around with it. "Control" is the keyword here - they are the basic components of VBA. They're simple to learn, even for a non-coder and are easy to manipulate.

Let's say you're working in Word. Clicking the Developer tab (followed by Designs Mode), will give you some controls you can work with. Select on of them, and you're presented with the basic VBA editor, complete with some basic coding already (a bit like a web editing program inserting the starting tags in html). Working with VBA as a starting point, the best option to learn more is to start manipulating these controls.

To add a simple control, the UserForm function should be used within your document, then you can place controls on it. Forms hold the code in and are the essential element of working with VBA. You can also edit the form itself to get slightly different results. Coming from a non-programming perspective, you'll soon realise that VBA needn't be scary or technical. Forms, after all, are something most of us are already well-versed in on the web. Text boxes (usually created in Word, or again, in websites) are another way of adding a control to VBA.

The similarities between basic forms and the web continues with the necessity of the command button (almost like a 'submit' on a form) that executes the elements of VBA you've been working with. However, you do not always have to 'command' VBA to start its assigned task, it can be event driven - when a certain number of parameters are in place (let's say you finish processing your company payroll at the end of a month) - a simple VBA code will "recognise" you just did April, the end of the tax year, and will automatically 'know' to do the end-of-year totals. Most people know simple string arguments to create an event-driven piece of code (the old if x = y then.... School of thought). VBA is, thankfully, much smarter and more flexible than this.

Depending on what version of Office you have, (2007 is the one with the most VBA features so far, understandably), you need less and less programming know-how, as the features of Office have got more advanced with age. With the advent of Office 2010 on the horizon, why not have a go now?

Author is a freelance copywriter. For more information on access vba books, please visit https://www.stl-training.co.uk

Original article appears here:
https://www.stl-training.co.uk/article-692-vba-not-just-programmers.html

Back to article list

Publication Guidelines

  • 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.

VBA courses in London and UK wide.

» Next available dates

 

Training courses

 

London's widest choice in
dates, venues, and prices

Public Schedule:

Buy now / Live dates

On-site / Closed company:

Get quote

Testimonials

More testimonials

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.47 secs.