Live data from Hacker News

Will VBA Die? (2019)

thespreadsheetguru.com

31–40 of 170 posts

Re: Will VBA Die? (2019)

#31
I don’t think it will. Microsoft might add another macro language but everyone is obsessed with backwards compatibility at MS and I highly doubt they would remove something as widely used as this. I used to be really annoyed by this as an engineer, but in contrast to Google’s culture where products are shutdown all the time I’ve started to come around that users should come first to avoid getting this reputation, even if it does become a combinatorial hell of different versions. I work at MS so I’m biased probably

Re: Will VBA Die? (2019)

#32
post #22

Not sure why they wouldn't go something C#/.NET based. If you're going to go the JavaScript route, at least pick TypeScript.

Whatever your position on the static typing debate surely one of the sweet spots for dynamic languages is casual use by non-professionals?

Re: Will VBA Die? (2019)

#34

Hopefully not. It's withstood the test of time, why replace it with something trendy? Edit: Yes, Python has also withstood the test of time... as a scientific and web language. There's no reason to assume that it could replace VBA as a spreadsheet automation language used by relatively non-technical business folks.

Python is widely regarded as a very good first language for non-programmers.

Re: Will VBA Die? (2019)

#35
post #27

I'm working on an excell addin right now. It doesn't use VBA (it uses microsoft interop libs for .NET) And I have zero interest in using VBA, but I will admit, it would have been much easier to do this project in VBA instead of C#. Debugging would have been easier. I could debug inside the VBA code-behind instead of Attaching to the excel process in Visual Studio. Deployment would have been easier. I could make an .x…

There is so much of this I can relate to, I have worked with legacy systems too and have been fortunate in a sense to have to drill into someone else's VBA and thankfully there were people there to run me through those strangeness of it.

While I don't think it needs to continue, I believe it's been replaced in all aspects to date.. I do think that there is a requirement for a knowledgeable person to at the very least lead the re-write.

> As for javascript, I doubt anyone that knows VBA well would have a hard time learning javascript, and if the codebehind for excel was slowly migrated to that, most devs would welcome the change.

One of the main points of contact for my VBA adventure picked up vanilla javascript super fast, and within a few weeks he was already explaining how it could be made semi strongly typed, he introduced us then to a newly formed TypeScript subset and we never looked back.

It's not a language issue, its an understanding issue, give a good engineer/developer/hacker any language and they will figure it out and know how to make it work.

That said, if I ever see VB again, I will still shed some salty tears.

Re: Will VBA Die? (2019)

#36
It'd honestly be a shame if it did (but I understand the stresses that might cause it to happen).

Flash back to ~1986, and Bill Gates wrote an article for a Byte magazine special edition in which he described a unified version of BASIC implemented across a suite of GUI productivity applications.

Keep in mind, this is before Windows 3.0 and the Microsoft hegomony, before Word for Windows, (and Access, Project, Visio, etc.), before OLE/COM/ActiveX/IDispatch, and all of which are arguably necessary to complete the vision he outlined in the article. Ten years later, the vision of the article was realized, and thirty-five years later, it not only still exists, it's still useful across a huge cross section of computer users. (Despite the radical changes in the industry over that time.)

Microsoft has gotten a lot of flack over the years, and a lot of it has been earned, but the ability to identity a useful target state ten years in the future and rally an organization to achieve that goal is an amazing accomplishment.

Re: Will VBA Die? (2019)

#39

As long as Excel is used by businesses, VBA will be relevant. Excel will probably continue to exist - and be supported and updated to ever newer versions - forever, so it stands to reason that VBA will probably also exist forever. Unless Microsoft goes bankrupt and Excel isn't picked up by another company. Which will also probably never happen.

Microsoft is slowly transitioning Excel macros to Javascript / Typescript. It will happen eventually.

The Excel object model is really a COM/IDispatch object model... it's been accessible from non-VBA applications essentially since the beginning.

Not Excel, but one of my first consulting projects was at a company that developed some custom libraries in Java and for a company that used ASP for the front end. The architecture we used ran the Java code in the Microsoft JVM, which then made Java accessible via IDispatch (and therefore by ASP's scripting engine).

IIRC, we were doing stuff similar to this:

    let javaObject = CreateObject("java:com.company.library.ApiClass")
    
    print javaObject.version
This is essentially a part of the 'embrace and extend' functionality that MS added to Java and got sued by Sun over. (There were also mechanisms for relatively easily calling into Windows from the MSJVM too... it felt an awful lot like the Proto-CLR that it was.)

Re: Will VBA Die? (2019)

#40
post #13

Microsoft should rather provide a better path toward office automation rather than just frustrate users. As I have seen it, javascript isn’t even remotely close to the sort of integration that made the success of VBA. Like how can I save a javascript macro as a user? Javascript user defined function? VSTA was a good attempt in its time, a mini visual studio integrated in office with VB.net and C# instead of VB6. That…

Agreed. JavaScript has no real upside here besides being fashionable. whereas built-in C# with access to the .Net framework would be really powerful.

Comparing javascript to C# is really not appropriate here, for so many reasons. I do think you know the main differences between interperated, transpiled and compiled for starters, but the "right tool for the job" is far more important.

Being fashionable is also not exactly fair, it was very flakey before jQuery created some entry level standard, because of its popularity it grew to what it is today, if thats 'fashionable' then I support it.

Post reply on HN