Codematic Excel developers logo
Codematic spreadsheet-excel development image

Rapid Application Development / Advanced Excel Development

Products for Excel
Commercial Products:
  - Classic Ribbon
  - Alt-FileSearch
  - Password Remover
Spreadsheet Quality Products
Free Products
Excel Development
Excel Development Index
Excel VBA
- VBA IDE (editor)
- VBA Training
- VBA Best Practice
- VBA Performance
- COM Performance
- VBA Security
Excel and Databases
Excel and Pivot Tables
Excel Add-ins
Worksheet Functions
Excel and xlls
Excel (in)security
Excel testing
Excel and .net
Excel External Links
Excel Developer Types
Professional Excel Development
Excel 2007
Excel 2010
Excel Development Archive
Spreadsheet Services
Spreadsheet Development
Spreadsheet Migration
Spreadsheet Maintenance
Spreadsheet Review
Spreadsheet Management
Excel User Confs
Consultant Profile
Book Reviews
Site Map

VBA Best Practice

There is a lot of information floating around about how to get various things done in VBA, how to make the best use, or sometimes just the most use of VBA and Excel.
This section aims to add an element of Quality and Best Practices. These are just general guidelines, a professional developer will always assess the options and make the appropriate choice in their specific situation.
These suggestions are specific to Excel VBA in commercial settings, many will not translate to other technologies or other settings.

VBA Best Practice Series

Design - 2 Questions, 2 Approaches

In terms of design there are two key questions and two key approaches

2 Questions
What will happen when things go right?
What will happen when things go wrong?

It is important to consider these two cases, many problems are created later in the life of the system if the second one is ignored early on.

2 Approaches:
What will the system do?
What real world objects am I modeling?

The first question leads to a procedural design, the second leads to a more object oriented one. OO has lots of benefits in many large scale developments. Often for smaller systems, which many spreadsheet systems are, a procedural approach is the simplest to implement and maintain. If all developers have only OO experience though then that must be factored in, and may result in an OO system because that is easier for the development team.

There is no best, or right and wrong, people who advocate one or the other very strongly, often just have no experience of the other. Certain technologies can also influence choice - Excel/VBA is not very rich from an OO point of view so a functional or procedural approach often makes sense. C++ and C# on the other hand have very powerful object oriented features and work best in OO style projects.


Upcoming Events:

25 January 2012 - UK Excel Developer Conference - London

Products for sale:


Office 2007 FileSearch replacement logo

New information about the missing FileSearch feature in Office 2007 and details of our pragmatic solution (Current price GBP 30.00)


worksheet password remover logo

Instant Excel worksheet protection remover and password recovery (Current price GBP 15.00)

Classic Ribbon Tab

classic ribbon for office 2007 logo

Add Excel 97/2000/2002/2003 compatible menu structure to Excel 2007
(Current Price GBP 10.00)


Products coming soon:

Link Manager

(Find and control external links in Excel Workbooks)

Due by Q1 2111.

XLAnalyst Pro

(Excel VBA based spreadsheet auditing tool)

Due before the end of 2111.

This page was last reviewed on December 21, 2011

©Codematic Ltd 1999-2011