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
Getting Started with VB.Net using ExcelDNA.docx
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
http://exceldna.codeplex.com/wikipage?title=Getting%20Started
1. Create a user-defined function in Visual Basic
http://www.blog.methodsinexcel.co.uk/2010/09/03/excel-da-hello-world-function/
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
http://www.blog.methodsinexcel.co.uk/2010/09/22/writing-an-excel-dna-function-using-an-ide/
Ross McLean uses the SharpDevelop IDE; VB Express is similar.
Stage 3: Adding Intellisense to a DNA solution
http://www.blog.methodsinexcel.co.uk/2010/10/28/ading-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.
http://excel-dna.net/2012/01/30/excel-vba-to-vb-net-with-excel-dna-and-netoffice/
http://netoffice.codeplex.com/
http://groups.google.com/group/exceldna/browse_frm/thread/f356a30adf9130d0/c7625c8836affd3d
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++ :
http://tangiblesoftwaresolutions.com/
Background reading
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
http://blogs.msdn.com/b/pstubbs/archive/2004/01/15/59049.aspx
Convert VBA to VB .Net and C#
http://msdn.microsoft.com/en-us/vstudio/ms788236
Free Book – Upgrading Microsoft Visual Basic 6.0 to Microsoft Visual Basic .NET
http://www.upsizing.co.uk/Art52_VBAToNet2.aspx
Converting Access VBA to VB.NET – General Principals
http://msdn.microsoft.com/en-us/library/aa192490%28v=office.11%29.aspx
Converting Code from VBA to Visual Basic .NET
Office 2003
For more information, see Introduction to Visual Basic .NET for Visual Basic Veterans.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vboriintroductiontovisualbasic70forvisualbasicveterans.asp
http://msdn.microsoft.com/en-us/library/kehz1dz1(vs.71).aspx
Introduction to Visual Basic .NET for Visual Basic Veterans
http://msdn.microsoft.com/en-us/library/kehz1dz1(v=vs.90).aspx
Help for Visual Basic 6.0 Users
http://oreilly.com/catalog/vbdotnetnut/chapter/appa.html
Appendix A
What’s New and Different in VB .NET