Common VBA Components
A true development performance boost provided they are well designed, continuously maintained and carefully tested.
Preface
Disambiguation
A Common Component has the same content in any VB-Project using it. It is developed, maintained, and tested in one specific - preferably dedicated - Workbook/VB-Project.
A component/module just having the same name with different code is not a Common Component in the subsequent sense.
My Common Components
- had initially been developed when it seemed appropriate
- had been maintained and extended every now and then
- has its dedicated VB-Project which includes a test environment and an unattended Regression Test
- is kept in a public GitHub repo of which I use clones
- meets a consistent coding standard and follows clean code principals (no defaults, early binding, avoiding unintended ‘case’ changes, etc.)
My management of Common Components
I use a Common Component Management Workbook (in a public GitHub repository) which optionally may be saved as Addin. It provides the (not only) the service to Update Outdated Common Components. A Somehow sophisticated approach but it does the job already for years - and is still supported.
My Common Components (overview)
Component | Module(s) | Status | Comment |
---|---|---|---|
Common VBA Message Services | mMsg, fMsg | public GitHub repo | Universal message service, used by mErH for instance |
Common VBA Error Services | mErH, mMsg, fMsg | public GitHub repo | Optionally uses mTrc |
Common VBA Execution Trace Services | mTrc | public GitHub repo | stand-alone or as optional component of mErH |
Common VBA Excel Workbook Services | mWbk | public GitHub repo | Existence/open check over multiple Excel instances, open services and other |
Common VBA File Services | mFso | public GitHub repo | Files and folder services including PrivateProfile file services |
Common VBA Basic Services | mBasic | private GitHub repo | The code is visible via the CompMan Workbook where the component is used |
Common VBA Queue and Stack services | mQ, clsQ mStck, clsStck |
public GitHub repo | Stack an Queue usage unified |
Common VBA Registry Services | mReg | private GitHub repo | Read/write named values simplified to the max |
See also: Conflicts with personal and public Common Components
Comments
Comments are welcome. I apologize for the fact that commenting requires a login to GitHub. This seems to be the only way to keep away spammers.