[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.excel.programming

Difference between VB and VBA?

Mike

12/14/2006 3:25:00 PM

Hi everyone,

What exactly the difference between VB and VBA?

Thanks,
Mike

2 Answers

John Coleman

12/14/2006 4:04:00 PM

0

The core language (syntax, control flow, etc) are exactly the same (if
you are comparing VB6 with VBA - all bets are off if you are talking
about VB.Net). The main difference is that VB can make stand-alone
executables whereas VBA must be hosted in an application like Excel to
run. Another difference is that VB is fully compiled but VBA is only
partially compiled (into "p-code") which is then run on an interpreter.
Thus a VB program will be quicker than the corresponding VBA program
(but not by as much as you might think - the partial compilation of VBA
makes it much closer to VB than to the purely interpreted VBScript).

HTH

-John Coleman

Mike wrote:
> Hi everyone,
>
> What exactly the difference between VB and VBA?
>
> Thanks,
> Mike

Mike

12/14/2006 4:53:00 PM

0

Now, say you have created a macro in Excel. Can you take its VBA code
and convert it into a VB one?

If yes, can you give an example please?

Thaks,
Mike



Jim Thomlinson wrote:
> In the grander scheme of things not too much. Visual Basic is a Computer
> language like C/C++/C# or Java or Delphi or... Visual Basic for application
> is the same language addapted to work with a number of different
> applications. Both VB and VBA use the same core engine. VB adds a bunch of
> functionallity for creating DLL's and such that VBA does not have. VBA is
> adapted to work with the object model for each of the applications it is
> partnered with. For example VBA for Excel is designed to work with the Excel
> object model of Workbooks, Worksheets and Ranges.
>
> One of the biggests differences is that VB will create compiled stand alone
> executable files. VBA can not stand alone. While you can "in a manner of
> speaking" compile VBA it does not create an executable file.
>
> If you were to take a course in VB it would be very applicable to gaining a
> better understanding of VBA and Vice Versa...
> --
> HTH...
>
> Jim Thomlinson
>
>
> "Mike" wrote:
>
> > Hi everyone,
> >
> > What exactly the difference between VB and VBA?
> >
> > Thanks,
> > Mike
> >
> >