This is a collection of links for learning about VB.Net and ExcelDna. Firstly, here are my two documents: a collection of resources and a worked example of migrating an addin to VB.Net
Practice project converting XLAM to ExcelDna.docx This shows the steps involved in taking a simple addin that creates a Table Of Contents worksheet in a workbook. It illustrates the basics of creating a dll, a Ribbon button, and access to the Excel object model. It does not use forms. Source code zip
Here for convenience are the links from the first document:
The latest Excel-DNA version is available on the CodePlex site: http://exceldna.codeplex.com also has links to tutorials
http://groups.google.com/group/exceldna Primary support channel
All applications use the ExcelDna.xll addin. The stages of learning successively add files:
1) Using only a text file MyAddin.dna which includes the source code text.
2) Add an external dll which you create from VB.net source code and compile using either the vbc.exe compile or the Visual Basic Studio IDE. I used the free Express edition.
3) Ease the transition using the official MS Primary Interop Assemblies (PIA) or third party libraries such as NetOffice
4) Simplify the deployment by packing the components into one .XLL file.
Stage 1: using only a .DNA test file
Getting Started with ExcelDna – Do this first
1. Create a user-defined function in Visual Basic
Similar to above. Ideal if you want to write User Defined Functions (UDF), or want to copy a UDF from VBA to DNA for a quick and easy-ish performance improvement.
Stage 2: Compiling a .DLL
Ross McLean uses the SharpDevelop IDE; VB Express is similar.
Stage 3: Adding Intellisense to a DNA solution
Download the PIA .Zip file from the link in that post and extract to your hard disk. Setup up a DNA project in the normal way, go to the “Project” menu, “Add reference”, then “.Net assembly Browser” then go and find the PIA folder you just extracted, and pick the right version for your needs.
Also see NetOffice, a version-independent set of Office interop assemblies put together by Sebastian Lange.
Stage 4: Simplify deployment by packing the components into one .XLL file.
ExcelDnaPack is a command-line utility to pack ExcelDna add-ins into a single .xll file.
Going further to C#
Charles Williams recommends this automatic code converter to ease the transition from VB to C# and C++ :
Currently (Feb 2012) the only documentation on ExcelDna is effectively the google group.
Note that http://exceldna.typepad.com is old, not updated since 2006.
Microsoft and other sources
Convert VBA to VB .Net and C#
Free Book – Upgrading Microsoft Visual Basic 6.0 to Microsoft Visual Basic .NET
Converting Access VBA to VB.NET – General Principals
Converting Code from VBA to Visual Basic .NET
For more information, see Introduction to Visual Basic .NET for Visual Basic Veterans.
Introduction to Visual Basic .NET for Visual Basic Veterans
Help for Visual Basic 6.0 Users
What’s New and Different in VB .NET