Microsoft is pushing Python for Excel and JS for add-ins.
Why do people still use VBA?
301–310 of 421 posts
Re: Why do people still use VBA?
#302Earlier quoted context omitted.
I read a stat somewhere that there are at least an order of magnitude more Excel "programmers" in the world than all pro developers in other languages combined.
And looking at how much work is involved in even just setting up a JavaScript frontend, I’m pretty sure the Excel programmers are yet another order of magnitude more productive than the latter. Which is kinda sad actually.
Re: Why do people still use VBA?
#303Earlier quoted context omitted.
Worth also pointing out that sometimes when you're in a corporate dystopian hell hole do not expect to be able to actually request or install software on your device. What is there is what you have and trying to get it changed is an exercise in taking on the bureaucracy. It's not worth it. Many people have tried and failed. Back in the dark ages, we had a horrible reporting engine in Word VBA that pulled report defin…
What you call monkey hammer is actually the “golden hammer,” or “law of the instrument.” Idk if that matters to you, but it’s an already defined thing. https://en.m.wikipedia.org/wiki/Law_of_the_instrument
Re: Why do people still use VBA?
#304VBA is a lovely language, that supports object-oriented programming (with composition... no inheritance). It has deep access to and control of Excel. It's mature and stable (Microsoft is no longer significantly changing it). "Real programmers" hate on it largely because of all the amateur spaghetti VBA code written by the business people (that the programmers are occasionally asked to debug).
It's full of bizarre quirks, like control characters in code that are localized.[1][2] Want your code to run on non-English installations? Better dynamically build all of the strings that are passed to that type of function using placeholders like Application.International(xlDecimalSeparator), making your code much less readable. When code breaks for this reason, it does so with incredibly unhelpful errors, and it is literally impossible for the developer to reproduce unless they know it's a potential problem with VBA, and then they have to switch their interface language to one they potentially don't even know to reproduce the problem.
In Word, at least, probably half of the most useful functions (insert a paragraph after the current one, etc.) will break if you use them on the last paragraph in a table cell, requiring tons of spaghetti-code workarounds.
Want to pass around a string of text that contains multiple formats, the equivalent of referring to the innerHtml property of a DOM element? Good luck with that, unless you want to do it all using hacky scripted-select and copy/paste.
Someone in a parallel thread compared it to Bash, and I actually agree with that. No one should be writing anything complicated in either language.
[1] https://stackoverflow.com/questions/20652409/using-vba-to-de...
[2] https://stackoverflow.com/questions/29832281/vba-range-funct...
Re: Why do people still use VBA?
#305Earlier quoted context omitted.
Maybe that turned out to be more of a strength than a weakness?
A strength for whom? Not the end user.
Re: Why do people still use VBA?
#306Re: Why do people still use VBA?
#307Earlier quoted context omitted.
I was talking about this with a friend the other week... I think what IT depts really need to do is let people go crazy with Excel/VBA, but write a script to monitor activity on xls files on the network over the long term. If there's an xls which has been in regular use for more than 18 months, and it contains macros, then it can be assumed it performs some important role and should be properly documented and checked…
You're actually on to a really important thing that IT depts misunderstand about Excel/VBA monstrosities. They exist because they work. You want UX or business analysis? You literally just got that done for you for free if you run into a Excel/VBA application. The hardest part of dev is figuring out requirements, so stop looking at these as toys and start realizing that shadow IT exists because of a gap in developmen…
Re: Why do people still use VBA?
#308Earlier quoted context omitted.
I can find bad examples of how things work in basically every department I chose if I look long enough. Are there IT-Managed things that border on insanity? Oh yes. Are these a good excuse to build a shadow IT? No, they are not. Don't get me wrong: I'm not bothered at all when a couple analysts get together and hack away at their own little tools in VBA. Kudos to them for getting into the spirit of things, and maybe…
Security is the non-negotiable. If they want to play with whatever tech tools to get their job done, have at it. They can ask for help when they really need it. But if they are taking short cuts with the security of the data, that needs to be cracked down on immediately, as they are putting the entire company in jeopardy.
Securing some data is very important. Some data indeed shouldn't exist in the first place. But for a lot of data it matters very little. Most security breaches have rather mild consequences.
Treating all data as megatopsecret and all security breaches as end of the company produces not only unproductive systems, but bad security.
Re: Why do people still use VBA?
#3091. The development environment is already installed.
2. The platform does a lot. Being able to program using Office components or program using browser components gives the programmer a lot to work with.
3. The platform extends into a "real" programming environment - VBA is a gateway drug to C# and all the other MS developer tools. Just like learning JS in the browser eventually turns into, can use my JS skills for writing other code on my machine?
Programmable platforms have historically been really important to adoption and longevity in the enterprise. The emergence of REST APIs as features on many web apps fills a lot of this gap for SaaS.