Live data from Hacker News

Why do people still use VBA?

sancarn.github.io

61–70 of 421 posts

Re: Why do people still use VBA?

#61
post #50

Earlier quoted context omitted.

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.

I always read those “X automated their job, finishes it 15 minutes and then does whatever” and wonder how true are they? How could it be that nobody notices or cares?

My understanding is he basically gets paid to put data into easily automated categories, and the company is soulless and has no ambition for automating anything.

Re: Why do people still use VBA?

#62
Couple of years ago someone I know in manufacturing asked me to add a "cell hiding" encryption function to an Excel spreadsheet (because they still use excel spreadsheets for showing redacted price information to clients), that they could unhide when they wished to view the data themselves.

Quite a clever solution they use, I thought.

I implemented a simple XOR based encryption in VBA and it worked.

So, I imagine that's just one of many real world business use cases.

I quite enjoyed the bizarre deep dive into VBA and Excel tho

Re: Why do people still use VBA?

#63
It started as a simple way to automate the boring stuff in Excel. In my very very junior days working I had to compile a neat dashboard from different sources which came in Excel format. Sometimes these workbooks had some mistakes, sometimes they were forms that were mangled by production managers (this before password protection and fixed layout forms were a thing — eeeesh),… it was mindless fixing, converting text to numbers, wrong date formats, aligning, copy pasting of hammer values from several files into a master file then printing it and dozens of forms onto an inkjet for the monthly operations meeting. What started as a full week job becomes 2 hours + printing after VBA started automating. The offending mangled forms had to be resent to the feeder managers with a note if they need additional help/advice how to overcome the limitations of the forms…).

Re: Why do people still use VBA?

#64
post #50

Earlier quoted context omitted.

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.

I always read those “X automated their job, finishes it 15 minutes and then does whatever” and wonder how true are they? How could it be that nobody notices or cares?

I have a few colleagues that told me they have a job like that. Not done in 15 minutes but 2 hours, then they goof off for the next 6 hours.

There are two reasons: 1. They have a specific job with a specific set of duties (think sysadmins, or administrative duties) in a large company or in a state beurocracy. 2. They would rather go home or do something more but they are not permitted: they have metered time in the office and other people would and do shut them down on any initiatives.

To me, a workplace like that is like a kafkaesque nightmare but they seem to be fine with it, or rather, have accepted it. It lets them focus on other things in life outside of work.

Re: Why do people still use VBA?

#65
post #17

Earlier quoted context omitted.

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.

Systemd means replacing your at least somewhat standardised shell scripts with an underdocumented, underspecified, opaque scripting language. It's not an improvement.

Re: Why do people still use VBA?

#66
Because there was no good alternative until recently. The future is with the new "add-ins" model: https://learn.microsoft.com/en-us/office/dev/add-ins/overvie... Say what you will about typescript, but at least it's better than VBA.

My main issue is that unlike VBA, I can't program it from right there in Excel. Sometimes I don't want to start up a full-fledged add-in project that's meant to be reused. I just want to run a quick-and-dirty script once to fix something right now. I discovered Script Lab (https://learn.microsoft.com/en-us/office/dev/add-ins/overvie...) while writing this, so maybe that'd help.

Re: Why do people still use VBA?

#67
post #50

Earlier quoted context omitted.

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.

I always read those “X automated their job, finishes it 15 minutes and then does whatever” and wonder how true are they? How could it be that nobody notices or cares?

Since WFH became more common, it is easier than ever to automate anything that you have to reproduce. If my workload is light, I will often try to automate boring tasks so I can have more "free" time to expand my knowledge, refactor parts of codebases I find terrible to work with, or occasionally give myself some time to mentally rest (cook dinner early, watch something interesting on YouTube, browse HN, etc).

Re: Why do people still use VBA?

#68
post #50

Earlier quoted context omitted.

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.

I always read those “X automated their job, finishes it 15 minutes and then does whatever” and wonder how true are they? How could it be that nobody notices or cares?

I started my career like this, with a boring job where I inherited a gigantic excel with a few macros. Every day I had to download via ftp millions of logs from high speed trains from all over france (the logs themselves were retrieved manually via a serial cable on each train by maintenance guys every few days). I would then run a few macros that would do a bunch of geoloc calculation, spit out results in 2 tables, one for "pretty sure results" and the other one with "not enough data", and spend the rest of the day looking a google earth screenshots and comparing lat/long and using my brain to do basic visual "puzzles". I spent a few days improving the macros but I felt limited so I learned python in a few months and created a piece of software based on graph theory that would do almost everything I was doing looking at google earth and bam, job automated. When I went to see my manager to ask for more to do, he saw the potential but let me sit on my ass a few month because I was a contractor and the job was done, and then pushed hard to get me formally hired to be trained and work in embedded C on high speed trains ! Life changing carrer move, would do it again.

Re: Why do people still use VBA?

#69

Because there was no good alternative until recently. The future is with the new "add-ins" model: https://learn.microsoft.com/en-us/office/dev/add-ins/overvie... Say what you will about typescript, but at least it's better than VBA. My main issue is that unlike VBA, I can't program it from right there in Excel. Sometimes I don't want to start up a full-fledged add-in project that's meant to be reused. I just want to…

EDIT: I did not see the script-lab mention at the end of your comment.

Microsoft Script-lab will allow you to do just that. https://www.microsoft.com/en-us/garage/profiles/script-lab/

The other issue: it is not trivial to share an addin to end users. You need to publish it to marketplace or sharepoint. Sideloading requires SMB server and GPO. However there is an option that is not mentioned anywhere: it is possible to embed it in a document and it will install when it is open for the first time (after user confirmation).

Re: Why do people still use VBA?

#70
There have been several half-baked efforts to introduce new kinds of automation into Office but none of them have all the functionality of VBA. But I guess working on that again is too boring and unappealing so we get flavors of the month instead.
Post reply on HN