In this post:

It’s the heritage of may active professional IT life time, a passion for Excel VB-Projects, and the result of my retirement life: A bunch of Common Components to increase the performance and quality of Excel VB-Project development, a Component Management Addin which keeps Common Components** up-to-date in all VB-Projects using them and last but not least a _professional ***Error Handling***_ with a comprehensive **Error Message* displayed.

Those feeling overwhelmed will likely benefit most. Both, Common Components and Component Management is able to sustainable changes Excel VP-Project development life from tinkered to professional.

Attraction for Common Components

Disambiguation

A Common Component in this context is a Standard Module or Class Module) with procedures regarding a certain context (Sub, Function, Property) designed for being used in any VB-Project.

Benefit, potential

Common Componets are a true efficacy boost for the VB-Project development not only when used/imported as a whole but also as a rich source of procedures for being copied into other modules. To unfold its full potential a Common Component needs to be thorowly and extensively tested (see regression testing which is possible best in a dedicated Workbook hosting it (a non dedicated Workbook will hardly ever provide a complete, comprehensive test environment which also supports regression testing. Last but not least, a Common Component should be kept identical in all Workbooks/VB-Projects using it.

Component Management (Excel only)

Not only for the management of Common Components but also for maintaining a basis for versioning:

  • An Update outdated Common Components service keeps used Common Components up-to-date by updating them when outdated and the Workbook is opened for development/maintenance (in a dedicated folder!)
  • An Export of changed VB-Components service supports versioning - in combination with versioning means like GitHub (what I prefer) by exporting any changed component
  • A Synchronization VB-Projects service supports development and maintenance without the unavoidable downtime for the productive Workbook otherwise.

See the _Common VBA Components Management for more information.

My Common Components

All my Common Component development aim for working completely autonomous, i.e. they are not requiring any other module, the use of other Common Components remains optional respectively. The most frequently used three of them are mentioned in this blog. Others are also available as public GitHub repos.

Attraction for a professional Error Handling with a comprehensive Error Message

An ideal error message in this respect will look as follows 1:
It provides the best possible support for debugging by means of a comprehensive error message and the means to resume the code line which raised/caused the error. Furthermore the Error Handling should provide a regression testing support, i.e. the ability to suppress the display of asserted error (errors which are explicitly tested and thus expected).

Attraction for Regression Testing

Regression testing could be considered the Holy Grail of IT quality management. For VB-Projects as a whole it may be not possible or too cumbersome. Common Components in contrast are perfect candidates for it (I’ve provided one for each of mine), specifically when hosted in a dedicated Workbook which allows a dedicated development environment. Something which hardly can be achieved when a component is just declared as common in a non-dedicated Workbook 2. Regression testing is supported by the Common VBA Error Services and the Common VBA Execution Trace Service.
See a complete example with the Common VBA Basic Services. The RegressionTest.ExecTrace.log file shows the result of the execution trace. The mBasicTest.bas is the test component which produces the execution trace result. See how to fork the public GitHub repo to make it all available as your own personal GitHub repo which you the may clone to your computer [by means of GitHub DeskTop) of which makes the whole thing available in a dedicated folder on your computer.3

  1. The Common VBA Error Services provides a best possible support for debugging and regression testing. 

  2. The Component Management supports both however, even the ad-hoc modification of Common Component in its using VB-Project. 

  3. Having a look on what GitHub provides - also for Excel VB-Project development will open a complete new world for those never heard if it - or having it ignored for a long time like me.