Will VBA Die? (2019)
51–60 of 170 posts
Re: Will VBA Die? (2019)
#52Earlier quoted context omitted.
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…
Issues like DCOM and legacy systems would need some interface from Microsoft of course to handle IDispatch, GC etc, but thats what Microsoft do.. And to behonest, as much as I like to rip on them, they do it well.
Edit: I think the Java example is a little bit different, but i don't know anything about Proto-CLR!
Re: Will VBA Die? (2019)
#53I'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…
I'd be happy to use C# but it's so god damn hard to learn those libraries.
The biggest disadvantage in using VBA is speed – not to mention the idiosyncrasies of the language itself, which can make complex code rather painful.
Writing a .xlam addin is easy, except there's no tooling for creating "builds".
On a separate but related note, since writing XML for the ribbon by hand is so annoying (and you also have to write callback wrappers for each Sub you want to expose) I have actually written a python tool that parses annotations from comments in .bas files in a given folder and spits out a .xlam file. Haven't gotten around to publishing it but if folks are interested I can give it a little oomph and finish in the next few weeks, so lmk
Re: Will VBA Die? (2019)
#54Earlier quoted context omitted.
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 'fashio…
Re: Will VBA Die? (2019)
#55Microsoft 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…
But it's not as easy to use as VBA, nor was it incredibly easy to work with from a development standpoint when I last tried to use it (Maybe I was doing it wrong, but I had to do a full VS install with the add-in module.)
Re: Will VBA Die? (2019)
#56Google spreadsheets was going to kill Excel, C# was going to kill VB, Sql Server was going to kill Access, etc. Look at how that turned out?
Maybe in an ideal world, but in the real world, there is a ridiculous amount of time, money and resources invested in VBA code. These sunk costs are very meaningful to corporations and governments and as long as corporations and governments give microsoft huge stacks of money, microsoft is going to keep VBA around.
Re: Will VBA Die? (2019)
#57Microsoft 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.
Re: Will VBA Die? (2019)
#58Re: Will VBA Die? (2019)
#59Earlier quoted context omitted.
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 'fashio…
I am old. I have no idea what interperated is :)
Re: Will VBA Die? (2019)
#60Weirder things have happened, but whatever would replace it, would create an industry overnight.