What is VBA ?


2007, Oct 08 edited
tags: code VBA Excel 


  VBA, alias Visual Basic for Applications, is a software extension, embeded in Microsoft Office tools, allowing the user to automate tasks with programs written in language close to Visual Basic.

This tool allows the user to create personal functions and procedures libraries within the applications (e.g. Word or Excel) as well as allowing application to communicate with each other and Windows. This section of the site is aimed to present an overview of this tool within MS Excel et MS Access ( 97 versions or better).

In this special section, you will find afew personal development examples.




VBA Programing from scratch : recording code



  An interesting way of starting programing with VBA is the use of the recording tool, accesible from the menu tools/macro/record. It all starts by pressing the Start Recording button. During the 'recording session', this tool will record user actions, translating it directly in VBA code. It will do this until the user presses the Stop Recording button.

Advantage : No need to know anything about VBA, but basic skills should make it easier to reuse the gernerated code. This code is available in the VBA Editor and can be modified, cleaned (remove unrelevant code) or debugged (correct your errors).




Function vs Sub



Both Objects are designed to handle VBA code. Both accept parameters, but what differentiates the two is that a function must return a result, whereas this is not the case for a Sub procedure.

The fuel of coding inspiration:music, travel, photography and whatever drives creativity to code.

You might also like