This is the first post about my new (coming) free managed COM Add-in “.NET Co Library” for MS Excel 2000 – 2007.
What .NET Co Library is
For a longer time I have used a similar tool (for internal use only) to store created VBA code and to reuse all the VBA code. Originally I used the CodeLibrary Access database that was shipped with the Microsoft Office Develop Edition (MODE). After some time I developed my own tool for it and at the same time I ported it to a SQL Server 2000 database.
The Add-in is also a revised and updated version of the .NET Connection Tool. When .NET Co Library is shipped then this tool will no longer be available for download.
The acronym “Co” in its name refers to Code and to Connection.
With the tool we can:
- Create connection strings to a various number of databases via two wizards, the .NET Wizard and the Data Link Wizard.
- Store the created connection strings in a structural way enabling us to reuse the connection strings in all kind of VBA solutions.
- In an organized way store VBA code, code snippets / procedures / modules, and SQL Queries which enabling us to reuse the code when wanted.
The Add-in uses an Access database to store all the data in. However, I have an idea about allowing using another database (SQL Server, MySQL et al) in a future update.
When the Add-in is installed a new menu item is added to the standard toolbar in the VB Editorn. The three main parts of the tool are:
The following screenshot shows the commands available under the Code section.
To add a code snippet to the database we first select the wanted code and then select the command Code Snippet. In the next step a wizard guide helps us further.
In the active Code Window a new sections is added to the menu – Code – when we right-click in the window. The following screenshot shows the available commands:
The Connection section contains the .NET Connection Tool’s solution (where the 255 limit no longer exist for connection strings – More than 32000 characters are now allowed for the connection strings). The following screenshot shows the available commands:
This section includes tools to maintenance the database and to make some general settings for the Code Library. The tools also makes it possible to move the database to a new location. For instance, the database can be moved to a network location where it can be shared by a group of developers. The following screenshot shows the available commands:
Another aspect that I may consider in the future is to make it available for other Office programs. Since most MS Office programs (except MS Outlook) expose the same VBE object model the work to implement it in MS Word, MS PowerPoint, MS Access, MS Project and MS Visio is rather simple. But first of all I like to make it available for MS Excel.
Finally, the development tools I use for .NET Co Library are:
Microsoft Visual Studio 2005 SP-1
Add-In Express 2007 for Microsoft .NET
Component One Studio Enterprise
MZ-Tools 2oo5 for Visual Studio 2005
This blogpost (hopefully) present the .NET Co Library from a general point of view which I also hope is understandable. In the next blogpost on the subject focus will be set to the Code section of the tool.
As usual, comments are welcome.