The managed COM Add-in .NET Co Library is introduced in the following blogpost: .NET Co Library – Part I
The Code Part
In order to add VBA code to the library we simple select the wanted code in the code window and choose one of the following commands under the Code section:
In the next step the following Windows form will become available where we create an alias for the code and add a comment if wanted:
The Code Library is organized in four predefined (and fixed) main groups, Code Snippet, Procedure, Module and finally the SQL Query group. Under each main group we can create customized subgroups. Under each subgroup we can add code to the library where each piece of code is saved under a customized unique alias.
The following screenshot shows the main Windows form, i e the core of the Code Library:
As You can see we can easily select main group, subgroup and a specific alias to which the code is associated with. We can both update and delete entries but the key function is to select wanted code to be inserted in the code window. We can either select a single code to be copied to the Window’s clipboard or we can add several code pieces and then copy all code to the clipboard.
The more code we store the larger the Access database will be (2 GB is the limit how large an Access database can be). Therefore a search function is available to, in a convenient way, locate the wanted code. The present search function is based on two similar SQL expressions, LIKE and NOT LIKE, where both of them can be used with “%” and “_”. The following screenshot shows the Windows form for the search function:
In the next blogpost on the subject I will cover the Connection part of the add-in.