VSTO & .NET & Excel

September 13, 2007

.NET Co Library – Part I

Filed under: .NET & Excel, COM Add-ins — Dennis M Wallentin @ 11:08 pm

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:

  • Code

  • Connection 

  • Maintenance

 Code

The following screenshot shows the commands available under the Code section.

code.png

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:

codewindow.png


Connection

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:

connection1.png


Maintenance

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:

 

maintenance.png

 

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

  • RoboHelp

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.

Kind regards,
Dennis

Advertisements

4 Comments »

  1. Hi Dennis,

    This is looking promising!

    Will

    Comment by Will Riley — September 27, 2007 @ 10:18 am

  2. Thanks Will 🙂

    Kind regards,
    Dennis

    Comment by Dennis Wallentin — September 27, 2007 @ 10:33 am

  3. Hi Dennis,
    This looks great!
    Good work!

    Comment by Ross — October 3, 2007 @ 11:20 am

  4. Thanks Ross and it looks like the only part left is the helpfile 🙂

    Kind regards,
    Dennis

    Comment by Dennis Wallentin — October 3, 2007 @ 11:48 am


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: