What are the main differences between VB.NET, VB6 and VBA?

Asked

Viewed 12,831 times

12

What are the main differences between VB.NET, VB6 and VBA?

1 answer

16


VB6

VB6 is the sixth and latest version of Microsoft’s Visual Basic language. Which in turn is a visual evolution (facilitates screen creation) of BASIC which was the product that gave birth to Microsoft and created an entire industry from the 1970s onwards. The first VB was born in 1991 and VB6 was launched in 1998. It gradually began to have some form of object orientation very rudimentary and failure.

VBA

Visual Basic for Applications is a variation of VB6 that began to be incorporated into Microsoft products and licensed to third parties to use in their applications as a way to extend them and allow the creation of scripts. It has some limitation, but it also has some specific possibilities to facilitate integration with the products that host it.

Both are considered obsolete, unsupported, and today are highly insecure. Although many people still use it, this is a serious mistake, nor is it worth talking about details of obsolete technologies and this is the most important thing to know about them. In the case of VBA the recommendation is to use Visual Studio Tools for Applications.

VB.NET

VB.NET would be the evolution of VB to run on .NET. But the language is so different that you can hardly call evolution. There was an effort to give compatibility to old VB6 applications, but a lot of things don’t work the same. In fact you shouldn’t even try to use the old way of programming.

Over time VB.NET got closer to C# and abandoned the VB style. Despite still evolving and supporting, Microsoft did not do a good job trying to keep it at a good level and has fewer programmers using the language, preferring C#. There are very few language advantages over C# and many disadvantages.

It is possible to integrate any . NET language with other products. Microsoft today adopts it as its main tool to extend the flexibility of its applications.

VB.NET is truly oriented a the object, has a Runtime (the CLR) much better, much faster, even depending on the Jitter, and has a more modern garbage collector based on generations, avoiding the problems of the reference count that was in VB. In addition there are syntactic differences and the standard library is quite different, based on everything that was done for C#. There is an extra library to try to maintain compatibility. It has some options to use one style more than the other.

There’s a Wikipedia article with a comparison. I think it gets more curious, except for those who are thinking of abandoning VB6 and want to know what will change. Although I think if you’re gonna start something new, you might as well go with C. The transition is almost the same to go to VB.Net and will participate in a more active community.

  • 3

    I do not understand how VBA can be obsolete, and it is released better and more revised every new version of Office.

  • 1

    You can read what’s on link. It still exists, but is obsolete. The recommendation is to use https://en.wikipedia.org/wiki/Visual_Studio_Tools_for_Applications

  • @taiar Correto. VBA It is still supported and new: https://dev.office.com/blogs/VBA-improvements-in-Office-2016. Visual Studio Tools for Applications is in fact another subject, it does not meet all the scenarios that VBA meets.

  • 1

    VBA is really obsolete. But I d.u.v.i.d.o. to Microsoft one day take it (she?) off the air with the so many people it uses. rs

  • 1

    @And there’s more and more code coming out every day. The problem is that although VBA is a weak language, Excel + VBA is a very powerful combination, and MS still offers nothing the height to replace VBA. I did not understand very well the "obsolete" since support and novelties remain.

  • @Caffé Obsolescence is perhaps more in the sense that it has an old and somewhat "verbiage syntax" (on error resume next, for me, is the maximum example of this rs), not in its use or resources.

  • They haven’t even taken Vbscript from Windows until today... by the way, the question should still mention Vbscript. OP is discriminating! = D

  • @Miguelangelo will not take even, MS has always kept the commitment to the products, even the bad :) It is up to a positive point not to let people in the hand.

  • I even think Vbscript cool, I have a lot of them around here... I would stay down if they took... =( rs

  • @Miguelangelo I had some, now only PS.

Show 5 more comments

Browser other questions tagged

You are not signed in. Login or sign up in order to post.