Creating an Excel add-in from VB.Net

User avatar
agibsonsw
SilverLounger
Posts: 2403
Joined: 05 Feb 2010, 22:21
Location: London ENGLAND

Creating an Excel add-in from VB.Net

Post by agibsonsw »

Hello. Visual Basic 2010, Excel 2010.

I have a couple of questions on the above subject please. But I won't need to accomplish this task, or even fully understand the steps, but just to have a basic understanding.

1) Sites I've seen talk about creating Functions that will become available to Excel. Must they all be functions or can they be Subs (macros) that the user can run?

2) In general terms, how could this add-in also create a new Ribbon tab? Could the Solution can contain one class for the functions (and subs) and another class that uses Excel Interop/VBA (or perhaps VSTO?) to modify the Ribbon?

I suspect that (for 2) it would have to be Excel Interop/VBA because VSTO uses .Net technology (Assemblies?) and so couldn't be part of a .COM component?

Andy.
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.

User avatar
HansV
Administrator
Posts: 78511
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Creating an Excel add-in from VB.Net

Post by HansV »

I don't know the answer to your questions, but take a look at Excel Solutions with Visual Studio.
Best wishes,
Hans

User avatar
agibsonsw
SilverLounger
Posts: 2403
Joined: 05 Feb 2010, 22:21
Location: London ENGLAND

Re: Creating an Excel add-in from VB.Net

Post by agibsonsw »

HansV wrote:I don't know the answer to your questions, but take a look at Excel Solutions with Visual Studio.
Thank you Hans. I was heading in the wrong direction! The site I was examining doesn't take account of the new Office features of VB.Net.

Mind you, MS aren't helping by referring to Office Solutions, Office Developer Tools, Visual Studio Tools for Office, etc., etc. But I'm forming the opinion that these are all the same thing :hairout:.

In particular, I was under the impression that VSTO was completely different to VBA and would require learning a new language. But I think it is just a layer (or bridge) between VB.Net and VBA. That is, once I have a reference to the Excel Application that all (or most) of the Excel Object Model will then be exposed.

Regards, Andy.
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.