Using an .xll/.dll built from C# in VBA
===

I am posting this to elaborate on what are the options to run some C# functions (compiled) from VBA. 

I have tried so far [XLW][1] and [Excel DNA][2]. Both of these enable you to build an .xll which you can reference from your Excel session to use ([Excel DNA][3] is better and easier. It is still supported also, whereas XLW hasn't seen any update since .net 3 and requires VS2008 or 2005 with certain templates to run).

In my understanding, XLLs present a problem as they can't be integrated into a spreadsheet and need to be separately loaded. 

1. Is there anyway to embed C# compiled code into a spreadsheet rather than Excel session to have VBA add ins working "standalone"/"out of the box"?
2. Is it possible to load XLLs at runtime from VBA otherwise ? Are they any potential risks when doing so ?
3. Any tips with regard to C#/VBA interop worth mentioning ?

Thank you !


  [1]: http://xlw.sourceforge.net/
  [2]: http://exceldna.codeplex.com/
  [3]: http://exceldna.codeplex.com/