In english   |   suomeksi

Homepage
IT Services
Consulting
Training
Get help now
Application Development
Support and Downloads
Contact Us
Send us a comment or question
Applications
MS Access
MS Excel
Coding and Macros
Excel VBA

Excel Visual Basic for Applications (VBA)

Excel VBA automations can be used to greatly speed repeating tasks. While working with Excel you often might need to repeatedly import or export data, insert rows, sort tables, create formulas, update Pivot table reports etc. Usually you even need to perform a set of operations to complete task in hand.

In general: if you can do a series of actions in Excel then it almost always can also be automated with VBA.

VBA is a programming language that is attached to a certain host application (in this case Excel, but MS Access, Word, Outlook and PowerPoint also have built in VBA). Different host application's VBA code vary as they all have their own object model. In excel we have objects like application (Excel itself), workbooks, worksheets, ranges and so on, but in Word for instance we would use object names application, documents, bookmarks etc.

In Excel VBA programming code can be generated with macrorecorder or it can be handbuilt. Code can be created or modified with VBA editor. With the recoder a sequence of Excel operations can be bundled under one macro. Quite quickly though more is needed. You might in some cases want the program to be able to "discuss" with the user and act differently depending on users responses or choices. This requires manual programming and therefore at least some programming knowledge.

Simple customized automation example

As an example we could have customized buttons for different tasks (e.g. Import Data, Search Product, Sort Table, Build Pivot Report) that all are attached to programming automations. When Import Data button is clicked the user could first be asked to choose the correct month. When the month is chosen and the Import button is clicked the program retrieves data from external file(s) or connects to an external datasource (and if needed cleans and formats the information to required format) the data from the source.

msgbox-dialog

From the users perspective this already makes usually time consuming and dull repeating tasks like manual data importing or reporting fun, fast and simple while the program itself does all the magic. The automation also is much more productive and error free and lets the user concentrate on task that need a human being.

There is more...

VBA is a full featured programming language with almost limitless possibilities. You can call other code from another, attach them to an event, add parameters to code, create your own functions, connect databases and run other applications just to mention few features.

There are several ways how to get started learning VBA:

If you have some programming background you can also start to learn yourself. If you decide the learning path, one way to proceed quickly is to take a course for this. Advantages taking a course rather than trying to learn yourself are that you learn the most important concrete things for starters. You then start to do the things the correct way by learning the best practices and good programming habits and you will also get the picture of what is important in the beginning of all the masses of information available and where to head next as you are developing your skills further.

Get help from us to provide you automations or help you in your project

If you need simple or complex automations or a whole application, you can just contact us and we can have a discussion and plan how to proceed. We are able to provide you excaxtly what you need.

News
 
Retrieve Your favorite (NYSE) Stocks with our Excel tool
Microsoft Excel, Access VBA Developing Services
IT Training
WEB Design and applications
MSDN
MSDN ExcelBlog
MSDN AccessBlog
Articles
Time parameters for Google search
 

Search from our site:



Registered Microsoft Partner

Phone: +358 50 566 6858
Helsinki, Finland
mika.oukka@netti.fi