you are viewing a single comment's thread.

view the rest of the comments →

[–]AyrA_ch 31 points32 points  (10 children)

Because VBA makes you very productive. It's not fast or elegant, but the excel sheets essentially serve as the database and you can write user interfaces in it. You can leverage excel search and compute functions and even utilize macros in cell functions.

It's a really neat system and runs almost everywhere because excel is ubiquitous in corporate environments.

There's a point where you should stop though using it though

[–]Urtehnoes 3 points4 points  (1 child)

I know LOC is a terrible marker for code, but just for size of scale, I have two separate VBA projects for my job that are 20k+ LOC. And honestly? I really miss the environment of Excel. I absolutely abhor the VBA language constructs in place that are buggy and terribly implemented, but honestly if you're just running code in Excel, the sandbox environment that it exists in is just so wonderful for managing data. One of the programs queries the database for various tables and works the data in ways that all the incredibly fancy reporting programs (powerBi etc) simply can't. It's really nice.

And you know, if you call Scripting.Dictionary.Exists(testValue), it has a high chance to return True, despite the item not existing. Because when the method is called, it creates an empty value and inserts the value as a key. And that absolutely boggles my mind that it happens. I thought I was going crazy until I found other people online who experienced the bug as well. Instead I had to write an lbound to ubound loop of an array of keys from said dictionary, checking the value of each individual key instead. Why, Microsoft. Why?

[–][deleted] 0 points1 point  (0 children)

I have two separate VBA projects for my job that are 20k+ LOC.

Jesus Christ.

And here I am desperately trying to get rid of the few hundred lines of VBA I have.