Live data from Hacker News

Why do people still use VBA?

sancarn.github.io

221–230 of 421 posts

Re: Why do people still use VBA?

#221
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…

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…

One of the bigger things I've ever built was a massive set of tooling based upon Excel + VBA + proprietary API. The old days ('00s). The best thing of developing in VBA was that the API was properly documented. Any function had documentation via VBA, plus via the primary tooling, plus via big old books. On top of that I had a premium support line to the developers of the API as I seemingly was one of the few worldwide actually using it. Heck, even a professor that showed up in the documentation was kind enough to help me for a bit. A shitty, but high-paid job for 10 FTE was reduced to a one-person show where the main job was adding intellect, not pay-for-clicks. Probably still is a one-person show. It's the one thing Python and R never achieved for me (note - I am lowly skiled at his): object oriented programming that helped, not hindered.

Re: Why do people still use VBA?

#223
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…

- It allows a user to easily extend their current work environment (i.e. MS Office applications). Other languages and IDEs could do that, too, but not so easily. This allows users to somewhat more gracefully extend their documents/data and knowledge instead of starting all over again with a "proper" programming language/environment. - I would not call it fast or resource-efficient, but fast enough and efficient enoug…

It’s fast and resource-efficient in that it doesn’t need to start up a comprehensive extra runtime environment like the CLR, and doesn’t need double the memory like GC languages tend to do, and is faster than many interpreted languages due to its P-code and its tight native integration, not needing an additional interop layer to communicate with its environment.

Re: Why do people still use VBA?

#225

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

"let people go crazy with Excel/VBA" Many years ago a company I worked for used to send out a spreadsheet to its suppliers which they would complete with the products they offered and then when it was received back there was a button in the spreadsheet that would automatically upload the data to a central database. When I first saw this I was curious how it worked and did a bit of investigation - turns out there was…

I have this great new product called "DELETE FROM products WHERE provider != 'mycompany'"

Re: Why do people still use VBA?

#226
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…

Is it still something you can code with your mouse?

I remember having to deal with it on my first job because the team knew nothing about coding. They had “recorded” macros by clicking around and never seeing a line of code. It was incredibly brittle: any change to the table, even adding a comment, would break it, but it allowed them to automate a task.

Re: Why do people still use VBA?

#228

Earlier quoted context omitted.

No one at my company would ever let IT take over their Excel/VBA processes. The moment IT touches your stuff, your job transforms from solving problems to writing emails and having meetings. Any change, no matter how trivial, takes dozens of emails, dozens of meetings, and half a year to orchestrate. If IT wants to help solve more business problems, it needs to fundamentally change its self-concept and purpose away f…

This is vastly underestimated. The difference between coding and managing coding.

Working with IT isn't even managing coding. Management implies power to hold someone accountable, while working with IT an extended exercise in nagging and supplicating an organization which is completely unresponsive and unaccountable in its outcomes and methods.

You might as well become an immigration lawyer and spend all day begging the government to explain why your latest M-10582-9DJVA-V isn't being processed in the normal time frame, even though it was stamped in triplicate and sent by Certified Mail with a full-color copy of every identification document you own.

The best way to deal with IT is to avoid depending on it ever in the slightest way. If you give it an inch, it will take a mile.

Re: Why do people still use VBA?

#229
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 typescript has "using" now? How can VBA still be so popular?

VBA supports automatic cleanup via Class_Terminate. :)

Re: Why do people still use VBA?

#230
post #226
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…

Is it still something you can code with your mouse? I remember having to deal with it on my first job because the team knew nothing about coding. They had “recorded” macros by clicking around and never seeing a line of code. It was incredibly brittle: any change to the table, even adding a comment, would break it, but it allowed them to automate a task.

You can still record VBA macros in MS Office.
Post reply on HN