Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Microsoft has moved away from the COM stack, VB6 is so last century and .Net rules the (MS) roost. Yet I find myself still banging out reams of VBA code am I dinosaur? The need for VBA is a new project automating Excel seeing as you ask.

I've tried to doing the same kind of thing using VSTO and it was just too damn buggy/hard/inefficient with a broken development model. I can't get rid of the feeling that I'm missing something, OTOH I really can't see a better way of solving this problem. What are your thoughts?

share|improve this question
Oh come on is that a serious question? For many tasks a spreadsheet is absolutely essential, Excel is the best one available and everyone has it. – MrTelly Jan 8 '11 at 5:00
Everyone has Excel? Really? I see OpenOffice more and more on client computers and I made the switch myself a few years ago. – Batibix Jan 8 '11 at 13:45
"Eighty percent of enterprise customers are still using some version of Microsoft Office..."… – Nick Jan 8 '11 at 22:01
@Nick - cheers for the stat, IMHE (Experience) I've never seen a corporate without MS office. I've not working in every company/country in the world, but then who has? Another case of some cows are brown on one side. – MrTelly Jan 9 '11 at 4:35
@MrTelly: Me neither. Literally every office I've ever worked at used MS Office. That said, I saw a stat from 2007 saying that 95% of the market was Excel. If both stats are true, competitors might be making headway, but as it is now Excel still dominates. – Nick Jan 9 '11 at 6:12
up vote 9 down vote accepted

Of course there is still a need.

Why is .net the big thing? Because it makes visual app development quick and easy - MS learned all that from Borland and thus was born .net. (Borland used to have one of the few really easy visual dev environments that could make native win32 executables).

All these other things and tools are still needed - the need for native win32 apps is however something that incites passionate argument. I'd argue the need for Win32 native apps will never go away. That's a side issue, but related.

If you want to generate an app / automation for word, excel, access, visio, etc etc then VBA is fast, simple, and tightly integrated. Why should it go away? Heck you can still do Excel macros of the kind that went out of fashion 15 years ago. Nobody much does because there are other ways that are better/faster/easier to understand.

Each tool has its place - if trying to use somethind else in place of VBA takes longer / costs more / is more difficult then its effectively trying to jam square pegs in round holes.

The software business is FULL of people with Hammer Syndrome. You know the one: "To a man with a hammer the whole world looks like a nail." Well every new s/w technology has its mad keen devotees who think it will solve every problem known to man, and then some. They are always wrong. Always have been, always will be.

share|improve this answer
VBA is fast, simple, and tightly integrated - says it all – MrTelly Jan 8 '11 at 7:07

I have lived with this problem for the last few years. VBA is pretty much dead, yet the VSTO model for me was just like you said: buggy, inflexible, and slow. So I saw it as a choice of getting the job done fast and effectively yet letting my professional skills stagnate, or getting the job done very painfully yet developing skills that will be around in the future.

My choice was the latter (VSTO), that is until Microsoft began changing their overall strategy starting about a year ago from proprietary only development (.NET), to embracing the rest of the development community (C++, javascript, html, etc). At that point the VSTO model of the future didn't seem so concrete. So I said screw it, went back to fast and easy VBA.

A few months later and my choice paid off: Microsoft announced Office 2013 "apps" or automation can be built in javascript. By looking at the other trends (Typescript, embracing js, html) it looks like this might be microsoft's preferred language for office going forward. It also looks like they won't be investing much in the VSTO platform moving forward.

So tl;dr: if you're primarily an office application developer, stick to vba, learn js when you get time and wait till your company upgrades to Office 2013.


So Office 2013 shipped and the Javascript api it came with is severely lacking in functionality. In it's current state, I don't believe it can replace VBA except for the most rudimentary applications.

Update August 2015:

JS Office Apps have been out for a few years. During this time I've been waiting for the Api to expand to the same level of functionality as what we have with VBA/VSTO. While I have heard rumors that Office 2016 will bring more api functionality to the Office Apps ecosystem, the api has not really evolved to support your standard LOB automation applications. From what Microsoft has released so far (including their newly revamped Office API's) it appears they aren't focused on this. Speculating here, but it appears Microsoft sees Office Apps really like an interface to the web/cloud/online store. Office Apps are not meant to be an application so much as to provide a window to an application. The focus is also on user interactivity, as opposed to automation. This is fundamentally different than the VBA/VSTO model, which treats Office as the application, it's own self contained application. I don't expect Apps to support the use cases of VBA/VSTO anytime soon. I remember reading Microsoft wants heavy office automation to die out, probably due to the security risks among other things. I use VSTO for Office automation now.

share|improve this answer
Thanks for the heads up, I've got a beta of 2013 on my home laptop, and I for one can't see where the Javascript goes, VBA is still there just as before though. – MrTelly Jan 8 '13 at 22:40
A shame they chose JavaScript, admittedly I'd prefer it over VBA and it can be a great language for scripts but really I would not like to make enterprise/business critical applications in it. Such a shame they havn't invested more in say IronPython/Ruby and integrate that with office. – Richard Todd Jul 26 '13 at 9:33
Yeah. Python would be cool. I recently ran into a project called [link] which tries to do just that. Looks pretty cool, can hook your python excel scripts into full python libraries. One big downside though is it requires an install on every computer that might use the scripts, which removes it from consideration in the environment i work in. It also costs money. – RMuesi Jul 26 '13 at 16:32

If you asked me that two days ago, I would have said no, VBA is totally on its way out. But the other day I opened up one of my old Excel applications and discovered that all the VBA declare statements were broken. Turns out Office 2010 included a new version of VBA, 7.0, which changed the syntax slightly. I was really surprised that MS released a new version and now I really wonder what its future will be. But even if VBA went the way of VB6, I think there would be a need for VBA development for quite some time given the sheer quantity of legacy office applications out there.

Personally, I have a pretty strong preference for vsto. I'm not a fan of VB's syntax, so it's nice to develop office applications with C#. Plus, using the office IDE feels like I'm coding in the dark ages. Now, I haven't done a HUGE amount of vsto development, but the biggest problem I've encountered is a relative lack of documentation for certain things. For example, it took me hours of googling the other day just to find a definitive list of callback signatures for the ribbon. There other reasons, but those are the first that come to mind. It's also possible that your difficulties with vsto are just related to re-learning how to do things. I know I had my fair share of frustrating moments trying to do something "simple" and having it take hours.

share|improve this answer
AFAIK the only changes in VBA 7 are related to 64 bit support. – Foole Jan 8 '11 at 6:32
Really? (I didn't research it beyond fixing up my declare statements.) – Nick Jan 8 '11 at 6:43
@Foole, you appear to be correct:… – Nick Jan 8 '11 at 21:47
agree the documentation for office interop is really bad at times. – Richard Todd Jul 26 '13 at 9:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.