Fog Creek Software
Discussion Board




Welcome! and rules

Joel on Software

VB.NET and VBA

It is my understanding VB5 and VB6 use the same internal code as the VBA used in Excel and Word. Now that VB6 is being replaced by VB.NET, what is going to happen to VBA in Excel and Word? Will it be left to die, or will it be upgraded to VBA.NET (if there is such a thing).

Just curious.

William Rayer
Wednesday, March 23, 2005

It's called VSA -- Visual Studio for Applications. At one time it was the planned successor for VBA:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnclinic/html/scripting01162001.asp

I have no idea if it's still planned as the scripting engine in Office apps.

Sgt.Sausage
Thursday, March 24, 2005

From the link, I get the impression VBA isn't included in future versions of .NET But if all the "non-programmers" busy writing macros (eg VBA code) for Excel etc suddenly find it isn't supported in the newest version of office, they are not going to be happy.

Or is MS seeking to distract attention from the fact they killed VB5 by killing Office next?

William Rayer
Thursday, March 24, 2005

I wouldn't be surprised if, at least for a couple of versions, Office developers get the old VBA IDE in the Office apps *and* get the new VSA IDE.

I certainly wouldn't want to be on the MS Office developer team and support both of them, but I really don't see where they would have a choice. You'd almost *have* to support both the old and the new for some transitional period.

Sgt.Sausage
Thursday, March 24, 2005

Here are some reported comments from Microsoft on VBA and a possible alternative:

http://searchvb.techtarget.com/originalContent/0,289142,sid8_gci1065550,00.html

It looks like Visual Studio Tools for Office might be the bridging technology to transition VBA developers to .NET (see the Microsoft Office Solution Development section of this article):

http://msdn.microsoft.com/vstudio/productinfo/roadmap.aspx

Mike Green
Thursday, March 24, 2005

"I wouldn't be surprised if, at least for a couple of versions, Office developers get the old VBA IDE in the Office apps *and* get the new VSA IDE."

I guess you're right - in the linked article MS said they weren't retiring VBA. And yet I understood VBA was the engine for VB5 and VB6, in the sense that the VBA interpreter is the same interpreter used for VB5 / 6. So the potential to support VB5 / 6 exists for as long as Office supports VBA.

Also there are millions of people out there, classing themselves as non-programmers (including my brother!) writing VBA code for Office who know nothing about VSTO (Visual Studio Tools for Office).

It seems to me MS are risking their dominance in languages *and* Office tools by trying to persuade everyone to move to .NET. If Openoffice get their act together in a few years and support VBA, I can see cross-grades from MS Office 2003 to OpenOffice 2005, instead of upgrades to MS Office 2005.

I know MS have previously been successful doing this, eg moving from Quickbasic for DOS to VB, and moving people from Excel macros to Excel VBA. But this time the move is different - the user base is much larger, is much less technical, and the benefits of Office 2005 over 2003 (or 97 for that matter) are small.

I've used MS software from 1980 and have a lot of respect for them. But this time I wonder if they have lost the plot.

William Rayer
Thursday, March 24, 2005

There is a lot of stuff in this thread, and it's getting a little confusing.  Let me just clarify a few things.

1) VBA backwards compatibility will of course be in Office forever.  Millions, perhaps billions of existing vital line-of-business applications are written in VBA, and they have to continue to work as people upgrade to newer versions of Office.

2) VSA was an ambitious "umbrella" project which was supposed to do everything from provide "scripting for the .NET framework" to VBA-like integration of the VS shell into applications.  Unfortunately, it never really fulfilled its promise for a variety of reasons.  However we believe that these are still important scenarios, and top minds are thinking about how we can innovate in this space.  Since I don't comment on hypothetical future products, I won't really say anything more about hypothetical future products in this area.

3) VB.NET does not _replace_ VB6 any more than Java replaced C++.  VB.NET is a new language designed to be easy for existing VB programmers to learn.

4) VSTO 1.0 added fairly simple managed code behind Word and Excel.  VSTO 2.0 will beta along with the rest of  Whidbey Beta 2, and provides a much, much richer model.  Word and Excel are now surfaced as designers within Visual Studio.  We use a model-view-controler design to add winforms-style ado.net data binding to commonly used word and Excel controls, we have RAD drag-n-drop data binding, offline and server-side data processing of XML data islands, all kinds of cool stuff.  It's really slick.  I'm quite pleased with how its turned out.

5) VSTO is NOT a replacement for VBA.  VBA comes "for free" when you buy Office.  VBA does macro recording, so that non-programmers can generate and re-use macros.  VBA is targetted at the office productivity worker _and_ professional developer constituencies.  VSTO by contrast is an add-on package to Visual Studio, not Office, and costs money.  (Applications generated by VSTO can be distributed free of charge -- the RUNTIME is free.  But the design time environment is a tool that we sell.)  VSTO is specifically targetted towards high-end line-of-business professional developers who are writing applications to be deployed within enterprises.

If you've got more questions about vsto, try reading our team blog at blogs.msdn.com/vsto.

Eric Lippert
Friday, March 25, 2005

Thanks for that insight Eric.

I've used VBA in Office and in other products such as Great Plains quite a bit. I realise that VSTO is targetted at the high end and isn't a replacement for VBA. I'm still left wondering if VBA development and use within these types of products has a long term future though.

Maybe it's due to all of the activity surrounding the upcoming Visual Studio release but I get the sense that Microsoft would like every developer to be using an edition of Visual Studio. Even the 'beginner' is catered for with the Express Editions. I could envisage a situation where a traditional Office VBA 'non-programmer' loads up Visual Basic 2005 Express Edition to solve her Office development issue. You very wisely don't speculate about future products but that doesn't stop us outsiders speculating. Maybe somewhere in the works there is a 'Visual Office Developer Express Edition' coming to replace VBA. Just my two penneth.

Mike Green
Friday, March 25, 2005

Thanks for the explanation Eric (I take it you work for Microsoft).

The answer to my OP seems to be then: Yes VB.NET is replacing VB6 (in the sense that VB6 is not being developed any more except perhaps bug fixes), but VBA should continue to be available for the forseeable future as part of new versions of MS Office.

William Rayer
Friday, March 25, 2005

Yes, I'm on the VSTO team.  Sorry, I should have mentioned that.

Eric Lippert
Friday, March 25, 2005

Eric, I wonder if you, or anyone else could shed some light? Do you know what the long term roadmap (or even short term!) for VBA in Access is? I presume it's not going anywhere, but what is the general expectation of it's placement?

Andrew Cherry
Monday, April 04, 2005

*  Recent Topics

*  Fog Creek Home