John R. Durant's WebLog

The "Voice" of Office Development

Migrating Excel VBA to VSTO 2005

A couple of weeks ago I blogged about VBA migration. My main contention was that migration has a lot more to do with re-thinking how the solution is put together than just changing language syntax. The .NET Framework and the advantages of VSTO 2005 should cause us to give the solution a much more careful look top to bottom. Stephen Bullen (Excel programmability avatar and author of Professional Excel Development) seemed to agree.

Today we published the third of three articles in this regard:

Redesigning an Excel VBA Solution for .NET Using Visual Studio 2005 Tools for Office

The article has an accompanying download so you can mess around with the source. What's best: the solution is pretty darn useful all on its own. It lets you use Excel to analyze your IIS logs in pretty cool ways. If you run IIS anywhere in your company, you'll look like a superstar for bringing this into play. If you are just using IIS as part of a home network then...well, you can at least confirm in the minds of family and friends how big of a geek you really are!

I won't have time blog tomorrow, as I am going to be getting ready for a cycling event in Boise Idaho. I hope my body doesn't complain too much. I expect it will.

 Rock Thought for the Day: I am listening to the Jimi Hendrix Experience tune: Voodoo Child. The opening riff, pregnant with so much soul, holds the only promise the blues ever makes: to cast a spell you never want broken.

Rock On

Published Thursday, September 08, 2005 1:25 PM by johnrdurant

Comments

 

Stephen Bullen said:

In the previous article, the question I suggested we ask is "Does the new runtime make it possible for me to deliver valuable new features to my users that couldn't (practically) be delivered before?". In this example, the (only) answer seems to be "I can put the UI in the Task Pane and thereby make it modeless". I'm not convinced the user's benefit (of putting the UI in the Task pane) justifies the expense (of a rewrite). Programming the task pane seems to be the only user-focused element where VSTO is clearly better than VBA (which is probably why it's the VSTO 'Poster Child'). The migration decision would be much easier if there were more situations where VSTO is clearly a better proposition than VBA. I don't see many people in the Office world outside Microsoft who've adopted the "It's better because it's .NET" dogma/mantra.
September 12, 2005 9:15 AM
 

Mike Staunton said:

Again, at the risk of being pedantic, the title should be Migrating Excel VBA Macros (or Sub-Routines) to VSTO 2005 - just to emphasise that user-defined functions are not covered (and the UDF code will have to live in the wilderness beyond the Office 12 default file definitions)

As a user though, I'm much less interested in the handful of things that VSTO can do that VBA Subs can't and more concerned with trying to solve a problem and deciding which is the best way to do it (VBA UDFs, C# or Mathematica or Matlab) - bearing, in mind, that I might require to use some numerical libraries (either third-party of my own)
September 13, 2005 5:43 AM
Anonymous comments are disabled

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker