Live data from Hacker News

Why do people still use VBA?

sancarn.github.io

281–290 of 421 posts

Re: Why do people still use VBA?

#281

Earlier quoted context omitted.

VBA serves an awesome niche. I once built an awesome simulator that did some pretty complex optimization stuff. The main sheet had input cells for the user, a couple of radio buttons for toggling certain features, and a button to fire off the built-in Excel solver plugin and pull certain values from that process and display it all on a GUI on the first sheet. It took me just a couple of days despite zero VBA experien…

> button to fire off the built-in Excel solver plugin and pull certain values That's pretty cool. VBA is terrific for glue code. Back in the day, before the Internet opened up the security hellmouth, ActiveX was pretty great for use cases like yours. Early '90s, I made an in-house cost estimation app using Access 2000. It'd extract data from our MicroStation (belch!) CAD drawings to generate budgets and bill of mater…

In the late 90s I worked for a small network solutions company. Cable infrastructure, lan, wan, email/file/printer servers. Most of our work was campus sized networks. Military bases, hospitals, corporate campuses, etc. We did all our drawings in Visio which hadn't yet been purchased by Microsoft. Visio added VBA support around 97 or 98. As soon as they did myself and the other network engineer on staff, we didn't have any developers, wrote a similar system in our "spare time" to extract a bill of materials and generate a cost estimate. Included everything down to the number of rack screws.

I ended up leaving about 3 months after it was done but they continued to use it for a few years until it was replaced by a COTS system.

Re: Why do people still use VBA?

#282

Earlier quoted context omitted.

All true, but the fascinating thing about the article is that it's the Subject Matter Experts demanding to use something other than VBA to be more productive, and the IT people saying no VBA is the only thing allowed because...reasons.

Often those SMEs are data folks, and if they are allowed to develop in $TOOL_DU_JOUR, and that app becomes business critical, the IT folks will be stuck supporting it. And if that thing doesn't become well supported, or it isn't easy to find someone who can support it, that's a problem. I've run into this quite a bit at my workplace. Some business group writes an app in Excel using VBA + an add-in and it becomes the…

Or just make it known that if you want support, here are the languages our IT staff know and can help you with.

Otherwise, you're on your own.

Re: Why do people still use VBA?

#283

Earlier quoted context omitted.

Often those SMEs are data folks, and if they are allowed to develop in $TOOL_DU_JOUR, and that app becomes business critical, the IT folks will be stuck supporting it. And if that thing doesn't become well supported, or it isn't easy to find someone who can support it, that's a problem. I've run into this quite a bit at my workplace. Some business group writes an app in Excel using VBA + an add-in and it becomes the…

Or just make it known that if you want support, here are the languages our IT staff know and can help you with. Otherwise, you're on your own.

That's a great way to go, but unfortunately the reality is often the folks go off and write stuff in the non-supported way. The business gets dependent on it, and then years later -- because IT is there to support the company overall -- IT gets stuck supporting it even if long ago they said they wouldn't.

Sure, you can have an internal political fight, but it only goes so far when everyone there is supposed to be working for the company. So while there'll be strong incentive to move to something else, there's still a need to keep it working in the mean time.

If you can prevent this up front it's better all around.

Re: Why do people still use VBA?

#284

Earlier 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…

What bothers me as practically 100% shadow IT worker (to the point of buying my own devices and internet connections with my own money) is that IT-departments don't care about the users, usability or productivity almost at all (and security people are especially bad at this). And that a lot of IT people frankly don't understand IT very much. Without shadowing it, I couldn't get anything done. I have to install new (o…

And the software that is installed is always 4+ years out of date. But oddly there are no “security concerns” about running 4 year old conda install that has had zero updates ever.

Re: Why do people still use VBA?

#285

Earlier quoted context omitted.

It might be niche for HN, but in muggle world its enormously popular.

Heh, muggle world is the niche, but that niche is arguably bigger than all of the dedicated software engineer niches.

At that point you're abusing the word niche

Re: Why do people still use VBA?

#286
post #280

Earlier quoted context omitted.

Heh, muggle world is the niche, but that niche is arguably bigger than all of the dedicated software engineer niches.

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?

#287

Corps have a dev environment sitting right in Excel that doesn't need special (management, management's management, adding to a registrar of projects, budgeting or project manager assigned, etc) approval for non-stock software. The stack's Excel, plus Sharepoint if you're really looking for a networked data store that also has a web interface. From that end-user direction, solutions emerge. And they're in VBA.

I don't understand how's Excel page with macros inside different from random exe file from security perspective? Does Excel have some kind of excellent sandbox implementation, so it's safe to run random macros on the work machine?

It's not any different just untenable. IT departments tend to block all threat-vectors, with the exception of excel macros as even the most basic user use macros in their day to day job.

A better diffentiating factor would be who developed the macro. If it's built in house by someone merely using it to make their lives easier it's doubtful they inserted malicious code. I guess ideally IT should review the code.

Re: Why do people still use VBA?

#288
post #268
post #184

– It’s built in. – The IDE is built in. – The syntax is beginner-friendly. – It’s stable and doesn’t change every six month. – It’s well-documented. – No build steps, it just runs, and fast. – It’s resource-efficient (CPU, RAM). – You can easily create dialogs and forms using the built-in visual GUI builder. – You can break into the built-in debugger from your Office document. – If you want to get fancy, it has inter…

But unfortunately microsoft didn’t invest into VBA in 20 years, other than keeping the light on. And it lacks so many modern features. There was an attempt at a .net version of VBA (would have worked the same way, with a mini visual studio embedded in Office), called VSTA. But it was killed. So the cattle (business users) is stuck with 1990s technology.

Maybe that turned out to be more of a strength than a weakness?

Re: Why do people still use VBA?

#289

Let's face it: IT is the bureaucracy department of modern times which can keep itself 95% busy with self inflicted problems and has 5% service orientation. Processes are opaque for outsiders and typically not helpful. I really had to lough when I read the following description of the IBM BPM but this sums up a good part of the issue: "...while IBM BPM does come with a REST API, this REST API is borderline useless to…

One of my first full time software engineering jobs was working on the trading floor of a bank, sitting next to the currency traders. I was hired by the head of Market Risk Management, whose job was to make sure the bank didn't lose too much money on any given day. He hired me because he did not trust the officially approved IT department to write the code to implement his algorithms. One example: they got something…

Was also working in trading floor support (as IT) in the early 2000s. We actually even had proper Excel add-ins (programmed in C++) that provided special functions and also connected to backend systems as far as I remember.

Re: Why do people still use VBA?

#290
post #36
post #5

Because it’s amazing! /s Years ago, I heard that JP Morgan had +20k access databases on their network. The data analysts that make up companies far and wide one day discovered that they hate what they’re doing every day. They investigate the “record macro” button. Some might even find it nifty. They use it again and again. Some may even try to get smart and investigate and get curious of the code that it spat out. So…

You get it, "record macro" is the key to this. MS could switch them to C# or JS or python or whatever, if they just added a button which did that.

This is the interesting thing. I haven't played with it myself but seems MS is trying that with their new Beta python script function, but their implementation is just crazy, completely handicapped. Can't see it being a true replacement for VBA in excel.
Post reply on HN