Live data from Hacker News

Why do people still use VBA?

sancarn.github.io

41–50 of 421 posts

Re: Why do people still use VBA?

#41
VB(A) is like Python. It's not pretty, but it gets the job done. (* if you think it's pretty, it's because you are inexperienced and don't know the many better alternatives *)

Any tool with a good ecosystem (tools/libraries/integrations) which allows you to get real work done is useful.

Visual Basic as a desktop app development system (or MS Access which added DB benefits) was very useful in a large number of scenarios. And when you outgrew that, you must have had enough money to pay to scale up to a "real" solution.

Without a doubt, a HUGE TON of money has been made using VBA based systems.

From my own experience (as a mostly-outsider finance dev), my biggest Excel/VBA rewrite was for a company that made $$$$ before, during, and after 2008 doing credit default swaps. Sure the Excel workbook took 5 minutes to open (before I rebuilt it), but VBA was doing a lot of heavy lifting. And the people with the knowledge were making big bucks for the company and themselves with bonuses.

This is really a lesson. Whether the tools are ideal or not, what matters more is if they are accessible to people not specifically trained to use such tools. Again, that's why Python has become #1 outside the client web browser. It doesn't mean the tools are the best, but it means they do the job and are accessible.

Re: Why do people still use VBA?

#42

Earlier quoted context omitted.

PowerShell including ISE, with tabs, multi-line cursor, syntax highlighting, autocomplete, step-through debugger, snippets, scriptable/extensible.

PowerShell with ISE is a lot better than the VBA editor in many ways but you're still in the same situation of using a long deprecated ide with an ancient version of a programming language (ISE is deprecated and if you're using the built in version of PowerShell you're stuck on the last legacy framework version from 7 years ago forever and missing a ton of improvements and fixes from newer versions of powershell)

Today, yes, but ISE has shipped with Windows since what, XP? And VBA never has - it's a part of Office.

Re: Why do people still use VBA?

#44
I've been developing VBA macros since 20 years. It's largely the same language as it was when I first started. I've made lots of automations with VBA but nowadays, I've almost fully moved to UiPath RPA. I think RPA is very underrated and it should be used in place of VBA for complex automations like button clicks, data entry, scrapping, etc.

Re: Why do people still use VBA?

#45
post #17

Why do Linux/Unix/Mac developers write shell scripts, when there are so many better languages out there? A large part is it integrates well with the shell and it is ubiquitous. VBA is basically the scripting language of Office. It integrates well with Microsoft Office, and in a business environment, pretty much everyone has access to it. Are there better languages? Sure. However, it is hard to beat the integration an…

The difference here is that Linux devs would get rightly chided for building entire applications in shell scripts. The existence a "glue language" isn't a bad thing, rather, it's a good thing. But when you wake up to find that your whole project is made of 100% glue, you might consider that a bit of a mess.

For the longest time many, if not most Linux distros, used a bunch of shell scripts for init.

And many Linux users whined for many years after that mess was replaced by systemd and many still do.

Re: Why do people still use VBA?

#46
post #24

Earlier quoted context omitted.

Are entire VBA projects really that ubiquitous? As far as I can see, there are really two category of those: first are the huge proprietary plugins from large B2B companies that serve as a way to deeply integrate their products into Excel Spreadsheets, and the second are more like extremely customized tools built by the enthusiastic tinkerer of a non-technical team to make a complex and repetitive task easier. If the…

Gigantic engineering mathematics calculation tools.

But if you can install matlab or torch you'd do that instead right? Which gets back to the whole restrictive IT thing where you don't have those tools. In fact the only full featured languages on the machine are javascript in the browser and vba. VBA is about 11 times faster than numpy for dense matrix math as it is compiled, and all the support math libraries like nonlinear solvers and whatnot are in dlls that were native coded, but with a lower ffi penalty than python. VBA is really a very underrated mathematical language that is mostly used for horrifically architected mission critical CRUD applications.

Re: Why do people still use VBA?

#47
post #16
post #15

Earlier quoted context omitted.

People think I am nuts for preferring the ISE over VSCode, but the ISE never crashes while running scripts!

Then you haven't used it enough :) The bare shell on the other hand is usually solid.

That's for sure not true. For my bigger projects (over 200 lines), I tend to use VSCode. Just having a look at the larger projects I've got up on github, I'm over 2000 lines across 3 projects - all developed in Code.

ISE does occasionally hang / crash, but it's quite rare compared to how VSCode behaves across every machine I've used it with. It really seems to be just a Powershell problem, haven't had the same issue in any other language.

When I'm really making great progress on something, having to fart around with killing and restarting the shell constantly is really disruptive. Yes, Code has better and more features, but for me the extra productivity does not overcome the crashy shell.

Re: Why do people still use VBA?

#48

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?

Re: Why do people still use VBA?

#49
post #47
post #16

Earlier quoted context omitted.

Then you haven't used it enough :) The bare shell on the other hand is usually solid.

That's for sure not true. For my bigger projects (over 200 lines), I tend to use VSCode. Just having a look at the larger projects I've got up on github, I'm over 2000 lines across 3 projects - all developed in Code. ISE does occasionally hang / crash, but it's quite rare compared to how VSCode behaves across every machine I've used it with. It really seems to be just a Powershell problem, haven't had the same issue…

I think you might be misunderstanding what I didn't say - I use the console for debugging (Set-PsDebug!) and even then it crashes (sometimes.)

I don't like vscode for powershell development and I find the pycharm experience for powershell (lol) much better.

Re: Why do people still use VBA?

#50

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.

This. My friend automated his whole job in Excel.

He supposedly can do a days work in fifteen minutes and then just hang out. Their computers are super locked down, can’t install anything, can’t go to any non-whitelisted sites, but they have Excel.

Post reply on HN