VSTO & .NET & Excel

December 3, 2007

.NET Co Library is released!

Filed under: .NET & Excel, Tools — Dennis M Wallentin @ 12:06 pm

Introduction

I have finished the work with .NET Co Library so now it’s officially released. It has been an interesting project in many ways. To work with the VBE’s object model has been a challenge and I’m looking forward to the day when it has been replaced.

I hope that this tool can be a valuable tool in the daily work for developing VBA solutions in Excel. To my knowledge it’s a unique tool in that it does not exist any similar add-in.

Acknowledgement

I would like to thank Ken (Puls) and Ross (Mclean) for their help to test it and also for their contributions to improve the UI. I’m part of a mixed developer group which is named the “Group”. The “Group” major contribution was simple to raise the question “Why”.

The following is a summary about .NET Co Library:

.NET Co Library can be used with

  • Microsoft Excel 2000 and later
  • Microsoft Windows 2000 and later
  • .NET Framework 2.0 and later.

What .NET Co Library is

.NET Co Library is a free managed COM add-in for Microsoft Excel. The acronym Co in its name refers to both Connection and Code. 

With the tool you can: 

  • Store created VBA code, code snippets / procedures / modules, and SQL Queries in a well organized way enabling you to easily reuse the code in all kind of Excel VBA solutions.

  • Create connection strings to a various number of databases with two wizards, the .NET Wizard and the Data Link Wizard. Store the created connections strings in a structural way enabling you to easily reuse the connection strings in all kind of Excel VBA solutions. 

.NET Co Library has been designed so it also can be shared within a group of VBA developers over a network.

Requirements, known issues and installation

Before installing .NET Co Library it is important that you explicit read the following sections in the help file:

  • Requirements

  • Known issues

  • Installation

The help file can be downloaded as a separate file (see below). 

The NET Co Library.zip file contains two files, the setup.exe file and the NET Co Library.msi file. Installing .NET Co Library on any Windows Vista version should be done with the setup.exe file.

The tool is available “as is” but XL-Dennis providing a free support for .NET Co Library and welcome any input to improve it.

To download the help file and installation package please see: Download XL-Dennis Tools

Note: There exist some improvements in the final version compared what I have been blogposting about so therefore please read the help file.
 
Kind regards,
Dennis

18 Comments »

  1. Sound pretty cool. Where do you store the snippets? Can a team of people share the same snippets?

    Comment by Johan Nordberg — December 3, 2007 @ 10:33 pm

  2. Hej Johan,

    After some long discussions with myself I ended up with a MDB (aka Access Database).

    In .NET Co Library we can either move the database or just set a new path to the database. Move the database via the provided UI and then set the path to the new network location on each computer that should have access to it.

    Kind regards,
    Dennis

    Comment by Dennis Wallentin — December 4, 2007 @ 1:14 am

  3. Cool! We actually talked about creating some sort of library for useful code snippets. We’ll check this out instead!

    Planning on publishing screenshots so one can see more of it before installing?

    Comment by tfsjohan — December 4, 2007 @ 12:39 pm

  4. Hi Johan,

    Let me know how things progress on Your side.

    I have covered the .NET Co Library in several blogposts here so I thought I could just make the help file available as a standalone download. It includes all the screenshots as well as other useful information.

    Kind regards,
    Dennis

    Comment by Dennis Wallentin — December 4, 2007 @ 3:01 pm

  5. Johan et al,

    I decided to upload some screenshots of main Windows Forms in use in the article at ExcelKB.

    Kind regards,
    Dennis

    Comment by Dennis Wallentin — December 4, 2007 @ 9:44 pm

  6. Dennis, this sounds like a great add-in but I can’t get it to work. I have .Net framework 2, Windows XP and Office 2003. I ran the hotfix, then installed your program using the setup.exe. I do not see the extra menu in the VBE and I do not see your addin in the Addin manager in VBE. Do you have any suggestions?

    Thanks, Charles

    Comment by Charles Chickering — January 31, 2008 @ 11:31 pm

  7. I finally got it. I thought the Trust Access to VB was checked but it wasn’t. I do have a couple of other quick comments after giving it a quick spin.

    1) When I copy a class module back from the library, it changes the name by adding cls in front of it. I understand that this may be good programming style but I have a lot of other code that references the class by the original name.

    2) Is it possible to add a table to the database to hold references that must be set for the code? I am usually interfacing to test equipment and that requires that I set references to some dll’s. It would be extremely useful to me if I the program would give me an option to include references that are already set in the current project when I copy the code into the library. Shoot me an email if you’d like to discuss this any further.

    Thanks,

    Charles

    Comment by Charles Chickering — February 1, 2008 @ 12:15 am

  8. Hi Charles,

    Thanks for Your comment. The #2 looks very interesting to me so I will look furhter into it. As for the #1 this should be easily changed for me.

    I’ll send You an e-mail.

    Kind regards,
    Dennis

    Comment by Dennis Wallentin — February 1, 2008 @ 11:39 am

  9. Dennis,

    thanks for this add-in! I finally got it working with Excel (had much the same trouble as Charles, but in my case I think it had to do with the order by which I applied the hot fix AFTER installing – had to do it the other way around…).

    Anyway, my question is: can we get this working also when using the VBE in Access; is there something you have to do in the code?

    I think that for someone that develops both in Excel and Access, as is my case, the benefits would be enormous!

    Once again, thanks for your effort and helpfulness.

    Regards,
    Pedro

    Comment by Pedro Batista — February 25, 2008 @ 2:34 pm

  10. Hi Pedro,
    Thanks for Your comments and Your input regarding the installation process of hotfix vs setup. It’s interesting to learn that depending on which of is installed first.

    I have received some input from other users where they also ask if it possible to use the add-in for other programs in the Office suite. The present version does not support it but I’m considering implementing it in the next version.

    Kind regards,
    Dennis

    Comment by Dennis Wallentin — February 25, 2008 @ 3:35 pm

  11. wow, that’s fast response to user comments, Dennis!

    Well, I guess I’ll wait for next version – thanks for your answer.

    Best of luck (and speed 😉 )for the next version.

    Regards,
    Pedro

    Comment by Pedro Batista — February 25, 2008 @ 3:54 pm

  12. Pedro,

    Thanks 🙂

    Another question I got is if next version will include an option to store complete VBA-project (excluding Userforms components).

    Kind regards,
    Dennis

    Comment by Dennis Wallentin — February 25, 2008 @ 4:22 pm

  13. Dear Dennis,
    I installed your net co library and found out that it gives me the bug described at this link.
    http://www.bettersolutions.com/excel/ECC653/MR026524332.htm
    I did as told in this article – removed your add-in and now everything works OK.
    I have another com add-in installed MZ-TOOLS for vba. It works OK.
    Has anyone else reported this problem?
    Using Excel 2007

    Comment by aivars — March 4, 2008 @ 9:07 am

  14. Many thanks for letting me know. At present You are the only one who have reported it. But not everyone has the kindness to let me know.

    Three questions:
    1. Which bug do You refer to at Better Solution?
    2. Which operating system do You use?
    3. Is the the SP-1 for Excel 2007 installed?

    Thanks,
    Dennis

    Comment by Dennis Wallentin — March 4, 2008 @ 11:44 am

  15. Hello again,

    1.Win XP Pro SP2 all updates OK

    2. Is there a quick way to tell if there is SP-1 installed? i did a google but did not come up.
    Anyway I will download it and install and will let you know if the problem still persists.

    I installed SP-1, installed again Net co library, and the problem appeared again.

    Uninstalled net co library and all working OK, so at least in my case it seems Net co library what is causing it.

    No other COM are installed except MZ-TOOLS.

    aivars

    Comment by aivars — March 4, 2008 @ 12:03 pm

  16. Hi Aivars,

    I wonder if the KB90802 fix can resolve this issue or not.

    This is what I like You to do:

    1. Install .NET Co Library
    2. Reboot the computer
    3. Open the Explorer and locate
    the folder Hotfix under the NET Co Library.
    4. Open the KB908002 folder and install the fix.
    5. Reboot the computer.
    6. Test it.

    If it does not work do the following:
    1. Uninstall .NET Co Library
    2. Reboot the computer.
    3. Reinstall .NET Co Library
    4. Test it.

    Thanks,
    Dennis

    Comment by Dennis Wallentin — March 4, 2008 @ 12:47 pm

  17. unfortunately, it did not help 🙂

    aivars

    Comment by aivars — March 4, 2008 @ 3:15 pm

  18. Aivars,

    OK and thanks for trying it out.

    I have filed it as an issue with .NET Co Library. Hopefully I can solve it in the next version of it.

    Kind regards,
    Dennis

    Comment by Dennis Wallentin — March 4, 2008 @ 4:33 pm


RSS feed for comments on this post. TrackBack URI

Leave a comment

Create a free website or blog at WordPress.com.